mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2024-11-30 21:39:57 +00:00
32 lines
1.4 KiB
Plaintext
32 lines
1.4 KiB
Plaintext
caption: tabs
|
|
created: 20131228162203521
|
|
modified: 20150221211706000
|
|
tags: Macros [[Core Macros]]
|
|
title: tabs Macro
|
|
type: text/vnd.tiddlywiki
|
|
|
|
The <<.def tabs>> [[macro|Macros]] presents a [[selection of tiddlers|Title Selection]] as a set of tabs that the user can switch between.
|
|
|
|
The tabs display the <<.field caption>> field of a tiddler if it has one, or the tiddler's title otherwise.
|
|
|
|
By default the tabs are arranged horizontally above the content. To get vertical tabs, set the <<.param class>> parameter to <<.value tc-vertical>>.
|
|
|
|
!! Parameters
|
|
|
|
;tabsList
|
|
: A [[filter|Filters]] selecting which tiddlers to include
|
|
;default
|
|
: The title of the tiddler whose tab is to be selected by default
|
|
;state
|
|
: The prefix for the title of a [[state tiddler|StateMechanism]] for noting the currently selected tab, defaulting to `$:/state/tab`. It is recommended that this be a [[system tiddler|SystemTiddlers]]
|
|
;class
|
|
: Additional [[CSS|Cascading Style Sheets]] classes for the generated `div` elements. Multiple classes can be separated with spaces
|
|
;template
|
|
: Optionally, the title of a tiddler to use as a [[template|TemplateTiddlers]] for transcluding the content of the selected tab
|
|
|
|
Within the template, the title of the selected tab is available in the <<.var currentTab>> variable.
|
|
|
|
The <<.vlink currentTiddler>> variable is not affected by the <<.var tabs>> macro.
|
|
|
|
<<.macro-examples "tabs">>
|