Recent Changes - Search:

add Test page

hide

Test


hide

Topics

show

Changed

Visitor's book Site map pmwiki-2.3.32

Toggle

MessagesReplacement version 2023-12-30new DebugMessages version 2024-01-14

Test of the Cookbook:Toggle recipe


2019-02-24 18.03.36 Jim - Simon at Auckland Airport.jpeg: 4032x3024, 1047k (2019 Feb 25 19:35)
At Auckland Airport
Photo: Jim

Toggle tests

(:toggle init=hide id="searchttc" show="Search our website" ttshow="find website content" hide="":)
>>id="searchttc"<<
-< [[Aotearoa/Search"find website content"|Search our website]]
(:searchbox target="Aotearoa/Search" :)
>><<

Search our website


Example %small%''(:toggle init=hide id="example" hide="hide example" show="show example" set=1 :)''
(:div1 id="example":)
[-(:pagelist fmt=#titlesummary group={$:ExcludeGroups} order=title count=6:)-]
(:div1end:)

Example show example


(:toggle id="tg1" init=hide:) (:toggle id="tg2" init=hide:)
>>lframe small id="tg1"<<
tg1
>>lframe small id="tg2"<<
tg2
>><<

Show Show

tg1

tg2

* toggle sidebar topics  %small%''(:toggle init=show id="sidebartopics"  hide="hide sidebar topics"  show="show sidebar topics"  set=1 :)''
* toggle sidebar changes %small%''(:toggle init=show id="sidebarchanges" hide="hide sidebar changes" show="show sidebar changes" set=1 :)''

Also test the show hide toggle for Topics and Changes in the side bar. The "set=1" parameter does not seem to work, and if "init=hide" is specified it appears to be ignored. Fixed in release of 2009-07-24

Note that this worked correctly in the previous version of ShowHide

Note the interaction where the toggle directive is declared in both the side bar and the main page.

Toggle group example

>>id="line1" frame bgcolor=#edf<<
'''Line 1''' always shows to start off with. When any of lines 2 to 4 display line 1 is hidden. When none of lines 2 to 4 are showing line 1 is displayed.
>>id="line2" class="lines" frame bgcolor=#edf<<
'''Line 2''' is hidden to start. When line 2 is shown line 1 and all other lines are hidden.
>>id="line3" class="lines" frame bgcolor=#edf<<
'''Line 3''' is hidden to start. When line 3 is shown line 1 and all other lines are hidden.
>>id="line4" class="lines" frame bgcolor=#edf<<
'''Line 4''' is hidden to start. When line 4 is shown line 1 and all other lines are hidden.
>><<
In this example only one line should ever show at a time.
* (:toggle id="line1"             group="lines" init=show show="show line 1" hide="":)
* (:toggle id="line2" id2="line1" group="lines" init=hide show="show line 2" hide="hide line 2":)
* (:toggle id="line3" id2="line1" group="lines" init=hide show="show line 3" hide="hide line 3":)
* (:toggle id="line4" id2="line1" group="lines" init=hide show="show line 4" hide="hide line 4":)

Line 1 always shows to start off with. When any of lines 2 to 4 display line 1 is hidden. When none of lines 2 to 4 are showing line 1 is displayed.

Line 2 is hidden to start. When line 2 is shown line 1 and all other lines are hidden.

Line 3 is hidden to start. When line 3 is shown line 1 and all other lines are hidden.

Line 4 is hidden to start. When line 4 is shown line 1 and all other lines are hidden.

In this example only one line should ever show at a time.

tahi Page last modified on 2017 Dec 09 22:13

Edit - History - Recent Changes - WikiHelp - Search - email page as link -> mailto:?Subject="KiwiWiki: Toggle"&Body=