Difference: VarVAR (3 vs. 4)

Revision 42015-09-25 - TWikiContributor

Line: 1 to 1
 
META TOPICPARENT name="TWikiVariables"

VAR{"NAME" ...} -- get a preference value from another web or topic and more

Line: 19 to 19
 
ignorenull="on" If specified, a null string ("") value is regarded as undefined. This affects whether or not the value specified by the default parameter is returned. "off"
  • Example 1: To get the members of TWikiAdminGroup, %VAR{"GROUP" topic="%USERSWEB%.TWikiAdminGroup"}%, which expands to massimo.sponza, francesco.cepparo, riccardo.smareglia.
  • Example 2: To get %WEBBGCOLOR% of the Main web write %VAR{"WEBBGCOLOR" web="Main"}%, which expands to #FFEFA6
Changed:
<
<
  • Example 3: Let's say you are writing the "foo" skin. And you want to have the users specify a string inserted in the head tag with FOOSKIN_HTML_HEAD_HOOK. That can be achived by the following:
    %VARVAL{"FOOSKIN_HTML_HEAD_HOOK" default="<nop>" ignorenull="on"}%
>
>
  • Example 3: Let's say you are writing the "foo" skin. And you want to have the users specify a string inserted in the head tag with FOOSKIN_HTML_HEAD_HOOK. That can be achived by the following:
    %VAR{"FOOSKIN_HTML_HEAD_HOOK" default="<nop>" ignorenull="on"}%
 
 
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 1999-2024 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback
Note: Please contribute updates to this topic on TWiki.org at TWiki:TWiki.VarVAR.