Tab Navigation Bar Custom Tag

Download TabNavBar.zip (3K)

Description

Requires ColdFusion 5 or greater.

TabNavBar.cfm is a ColdFusion custom tag that creates a tab-style navigation bar using standard HTML.

Syntax

<CF_TabNavBar
	TABLIST="Tab name list" 
	URLLIST="Tab URL list" 
	[ACTIVETAB="Selected tab"]
	[ACTIVETABCOLOR="Hex color"]
	[ACTIVETABCLASS="Class name"]
	[ACTIVETEXTCLASS="Class name"]
	[ACTIVETEXTSTYLE="CSS style"]
	[BASESIZE="Number"]
	[COMPRESS="Boolean"]
	[DELIMITER="List delimiter"]
	[INACTIVETABCOLOR="Hex color"]
	[INACTIVETABCLASS="Class name"]
	[INACTIVETEXTCLASS="Class name"]
	[INACTIVETEXTSTYLE="CSS style"]
	[LABELLIST="Popup label list"]
	[PADDING="Number"]
	[TABLINK="Boolean"]
	[WIDTH="Percent or pixels"]
>

Attributes

ACTIVETAB     (optional, string)     Tab name to make active. Default is none.
ACTIVETABCOLOR     (optional, string)     Background color for the active tab in hex. Default is "66CCCC".
ACTIVETABCLASS     (optional, string)     Value to place in the CLASS attribute for the table cell of the active tab. Default is none.
ACTIVETEXTCLASS     (optional, string)     Value to place in the CLASS attribute for the text of the active tab. Default is none.
ACTIVETEXTSTYLE     (optional, string)     Value to place in the STYLE attribute for the text of the active tab. Default is "font-weight:bold;".
BASESIZE     (optional, number)     Width in pixels of baseline beneath tabs. Enter zero for no baseline. Default is "5".
COMPRESS     (optional, boolean)     Remove all whitespace from generated code other than single spaces. Default is "YES".
DELIMITER     (optional, string)     Delimiter used for lists. All lists must use the same delimiter. Default is a comma (,).
INACTIVETABCOLOR     (optional, string)     Background color for inactive tabs in hex. Default is "EAEAEA".
INACTIVETABCLASS     (optional, string)     Value to place in the CLASS attribute for the table cells of inactive tabs. Default is none.
INACTIVETEXTCLASS     (optional, string)     Value to place in the CLASS attribute for the text of inactive tabs. Default is none.
INACTIVETEXTSTYLE     (optional, string)     Value to place in the STYLE attribute for the text of inactive tabs. Default is "font-weight:bold;".
LABELLIST     (optional, list)     List of popup labels used on tab links. Number of labels must match the number of tabs and use the same delimiter. Default is no popups.
PADDING     (optional, number)     Padding in pixels for the tabs. Default is "5".
TABLINK     (optional, boolean)     Make the entire tab a link. Default is "YES".
TABLIST     (REQUIRED, list)     Delimited list of tab names. These value will be displayed as the text on the tabs.
URLLIST     (REQUIRED, list)     Delimited list of URLs for the tabs. Number of URLs must match the number of tabs.
WIDTH     (optional, string)     Width for the tab bar as a percentage or pixels. Default is "100%".

Examples

Products Services

<CFPARAM NAME="URL.CurrTab" DEFAULT="">

<CF_TabNavBar 
	TABLIST="Products,Services"
	URLLIST="CFCTtabnavbar.cfm?CurrTab=Products,CFCTtabnavbar.cfm?CurrTab=Services"
	ACTIVETAB="">

Planes Trains

<CFPARAM NAME="URL.CurrTab" DEFAULT="">

<CF_TabNavBar 
	DELIMITER=":"
	TABLIST="Planes:Trains"
	URLLIST="CFCTtabnavbar.cfm?CurrTab=Planes:CFCTtabnavbar.cfm?CurrTab=Trains"
	LABELLIST="View plane info:View train info"
	ACTIVETAB=""
	ACTIVETABCOLOR="66FFFF"
	INACTIVETABCOLOR="FFFF00"
	WIDTH="300"
	BASESIZE="2"
	PADDING="2">

Site last updated: 11 March 2012