Content last modified Tuesday 24 August 2021
hop to #bottom
Categories:
Author:
Current version:
0.4
About It:
Get it:
Rate it:
  • Helpful?
  • 3 Yes
  • 0 No
Flag it:

If you'd like to provide updated information and do not have access to directly edit, please contact the site admin; thanks!

cbs_navigation_menu

Description

This plugin allows to create a custom navigation menu based on Textpattern sections and/or full external URL’s. You can choose which sections you want to display in which order and style the current section differently.

Or, instead of sections you can specify full URL’s (starting with http://, ftp://, mailto: or any other prefix) and they will be linked “as is”.

You can also specify access keys for each menu entry.

Syntax

<txp:cbs_navigation_menu sections="a,b,c" titles="A,B,C" />

Attributes

Required

  • sections: Comma-separated list of sections or full URL’s you want to link in your navigation menu, in order, with no spaces before and after commas. For the homepage, specify ‘default’ as section name. Each entry is interpreted as a Textpattern section, unless it contains a ‘:’ character like in any full URL starting with ‘http://’, ‘ftp://’, ‘mailto:’, …
  • titles: Comma-separated list of titles you want to display for each section of the “sections” attribute above, with no spaces before and after commas.

Optional

  • accesskeys: Comma-separated list of keyboard access keys to associate with each section link of the “sections” attribute above, with no spaces before and after commas. If you don’t want to specify an access key for a section, leave it empty (’‘), but you must have the same number of commas as in the “sections” and “titles” attributes. Default is no access keys.
  • break: HTML tag to be used for line breaks, without brackets. Default is br.
  • wraptag: HTML tag to be used as the wraptag, without brackets. Default is empty.
  • class: CSS class attribute for wraptag, default is no class attribute.
  • activeclass: CSS class attribute to apply to links pointing to the current section, if any. Default is no class attribute.
  • activenolink: When set to true, the current section will not be linked, but wrapped with a <span> tag instead. The class of the “activeclass” attribute and the id of the “ids” attribute, if specified, will be applied to this <span> tag. Default is false.
  • ids: Comma-separated list of XHTML id attributes to apply to each menu item, with no spaces before and after commas. If you don’t want to add an id attribute for a section, leave it empty (’‘), but you must have the same number of commas as in the “sections” and “titles” attributes. Default is no id attribute.

Changes history

v0.4 (2006-09-25)

  • Added the “activenolink” attribute that allows to not link the current section.
  • Replaced the “firstid” attribute with the more flexible “ids” attribute that allows to set an optional id for each element of the menu.

v0.3 (2006-08-16)

  • Small bugfix: Now it is possible to specify “0” as accesskey.

v0.2 (2006-07-27)

  • Small bugfix: using br instead of <br /> as a default value for “break”.

v0.1 (2006-07-16)

Initial release.

Article Request Count:
Initially released:
2006-07-16
Posted here:
16 Jul 2006

You know you want to visit the Archives.
Published with Textpattern