%META:TOPICINFO{author="ProjectContributor" date="1655109453" format="1.1" version="1"}%
%META:TOPICPARENT{name="Macros"}%
---+ TWISTY -- generate content block with interactive visibility controls
This renders the button as well as the toggled content section contained within this and the closing =ENDTWISTY= tag.
---++ Parameters
    %TABLE{sort="off"}%
    | *Parameter*    | *Description* | *Default* |
    | =id=           | Used to link [[VarTWISTYBUTTON][TWISTYBUTTON]] and [[VarTWISTYTOGGLE][TWISTYTOGGLE]] |  |
    | =link=         | Link label for both show and hide links  | |
    | =hidelink=     | Hide link label  | |
    | =showlink=     | Show link label  | |
    | =mode=         | ="block"= or ="inline"= Specify if the Twisty Toggle section will use a =&lt;div&gt;= or a =&lt;span&gt;= tag. Note that if the contents contains block elements such as =div=, =mode= should be =block= as well to create valid HTML markup.  | =&lt;block&gt;= |
    | =showimgleft=  | Specify the url of an image that will be displayed with the show link at the left side of the link. <br />You may use [[VarICONURLPATH][ICONURLPATH]] to display one of the %SYSTEMWEB%.DocumentGraphics icons. Alternatively use an image attached to the topic. | |
    | =hideimgleft=  | Specify the url of an image that will be displayed with the hide link at the left side of the link. <br />You may use [[VarICONURLPATH][ICONURLPATH]] to display one of the %SYSTEMWEB%.DocumentGraphics icons. Alternatively use an image attached to the topic. | |
    | =showimgright= | Specify the url of an image that will be displayed with the show link at the right side of the link. <br />You may use [[VarICONURLPATH][ICONURLPATH]] to display one of the %SYSTEMWEB%.DocumentGraphics icons. Alternatively use an image attached to the topic. | |
    | =hideimgright= | Specify the url of an image that will be displayed with the hide link at the right side of the link. <br />You may use [[VarICONURLPATH][ICONURLPATH]] to display one of the %SYSTEMWEB%.DocumentGraphics icons. Alternatively use an image attached to the topic. | |
    | =remember=     | If ="on"=, the Twisty state is remembered the next time the page is shown. If ="off"=, the stored setting will be cleared.<p></p><div class="foswikiHelp">%X% *Note:* when used, think carefully about a unique name (id) for the Twisty, otherwise the cookie that is set might affect other Twisties with the same name. Also note that only interaction is stored, not the state of the Twisty when left unclicked.</div> | |
    | =start=        | ="hide"= or ="show"= Initial state of the Twisty; this will override any setting stored in a cookie (see =remember=).  | |
    | =firststart=   | ="hide"= or ="show"= Initial state of the Twisty the first time the visitor gets to see the Twisty; this will NOT override cookie settings (see =remember=).  | |
    | =noscript=     | Make content hidden in case use does not have !JavaScript on. Default content is shown in case !JavaScript if off | |
    | =class=        | CSS class name for Twisty element |  |
    | =linkclass= | CSS class name for link | |
    | =prefix=       | Text to display before the show/hide links | |
    | =suffix=       | Text to display after the show/hide links | |
Additional parameters =img=, =imgleft=, =imgright=, =hideimg=, =showimg= are deprecated, use =showimgleft=, =hideimgleft=, =showimgright= or =hideimgright=.
    
%STOPINCLUDE%
---++ Related
%SEARCH{"name=~'TWISTY' AND name!='%TOPIC%'" type="query" format="   * [[$topic][$pattern(.*?---\++ ([^\n]*).*)]]" nonoise="on"}%
