Loading...
 
Skip to main content

switchMenuPlugin

SWITCHMENU

An easy way to insert a Dynamic Drive switchmenu onto a page:

Copy to clipboard
{SWITCHMENU(persistmenu=>yes|no , persisttype=>sitewide|local , menu=>V|H|any , item=>V|H|any )} optional CSS followed by wiki text with headers and links {SWITCHMENU}

The text enclosed will be tansformed in a switch menu:

  • Lines starting with a "!" as menu title (text or image in wiki syntax)
  • Lines with a wiki/url link as submenu items
  • Other lines accepting full wiki syntax will be switched within menu


The lines preceeding first "!" header or link are encapsuled between styles tags.
They should conform to the CSS sysntax (not including the <style> tags).
The menu uses classes .menutitle and .submenu what you can cascade in CSS.

If no header "!" before first link: default header 'wikiplugin_switchmenu'

All parameters optional:

Parameter default choices Definition
persistmenu yes no should the menu choice persist (DD original)
persisttype sitewide local menu persists across site or for this page only (DD original)
menu V H, <any> menu bars set horizontal or vertical; or custom trailer
item V H, <any> items set horizontal or vertical; or custom trailer

Note that persistmenu=yes will produce cookies, one per page if persisttype=local.
Caution: only one switchmenu in the global page !

Actually, you can just enclose any wiki with "!" headers in the switchMenuPlugin, then the page is switched 😛

See code and example attached.
Demo: http://toggg.com/tiki/tiki-index.php?page=colorado

COPYRIGHT: Copyright notices may not be withdrawn !
COPYRIGHT: No copyright notices from toggg ! Do what you like...
COPYRIGHT: No copyright notices from colorado ! Do what you like...
COPYRIGHT: No copyright notices from TikiMODS.com ! Do what you like...

colorado defines, toggg codes.

some news from the front

The plugin is pretty stable now and fully usable.
Nevertheless, some improvment will be made:

  • when the menu is horizontal (H) and the items vertical (V) then the items should roll down aligned with their menu bar
  • as the menu can be used to switch pages (see: http://toggg.com/tiki/tiki-index.php?page=togggSwitchHome), the menu bar should open onload on a possibly fixed menu option
  • currently, only one switchmenu can be implemented on a document. We study the possibility to remove this limitation.

Page last modified on Tuesday 05 July 2005 19:49:59 GMT-0000