Tags:
create new tag
view all tags

INCLUDEPARAMS{<list of parameter definitions>} - used in macro topics

  • Syntax: %INCLUDEPARAMS{<list of parameter names with default values and documentations string>}%
  • What happens:
    1. When viewed directly:
      • The defined paramters are shown in a table listed with default values and short description.
    2. When used as macro (i.e. shown via %INCLUDE{...}% in another topic)
      • The defined paramters are (again) shown in a table, now the actual value for the paramers are also shown.
      • The paramers will be used with default value if the parameter is not submitted by the %INCLUDE{...}%
  • Supported paramters: None (no fixed name parameters are supported).
  • Syntax for <list of parameter names with default values and documentations string> is shown by example:
          %INCLUDEPARAMS{
             debug = "no      ::doc:: =yes= or =no="                    - Show debug information in =%INCLUDINGTOPIC%="
             size  = "medium  ::doc:: =small= , =medium= or =large=     - Size of brunch"
             egg   = "boiled  ::doc:: =boiled=, =srambled= or =porched= - How do you want your egg?"
          }% 
    Notes:
    • ::doc:: is used as delimeter between default value on the left side and documentation on the right side (initial and trailing blanks are removed)
    • You cannot have a lineshift in the middle of a parameter definition
    • You must escape ", i.e. write \" to put a " inside a parameter definition
    • You cannot have an }% inside, use }<nop>% if you need to display }% as part of documentation
  • Examples:
    • See IncludeTopicsAndWebPages
      Disclaimer: The above link does not function until some changes have been made to TWiki docs, please read Changes to be made to TWiki doc
    • Output is put inside a <div class='twikiDefaultIncludeParamTable'> ...</div> , to disable output in %INCLUDINGTOPIC% you may...
      1. either Dynamically set css style div.twikiDefaultIncludeParamTable {display: none} (for instance based on %debug% parameter and %IF{...}% )
      2. or Place %INCLUDEPARAMS{...}% before your %STARTINCLUDE%
  • Related: IF, INCLUDE, STARTINCLUDE
Edit | Attach | Watch | Print version | History: r3 < r2 < r1 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r3 - 2006-10-27 - NielsKoldso
 
  • Learn about TWiki  
  • Download TWiki
This site is powered by the TWiki collaboration platform Powered by Perl Hosted by OICcam.com Ideas, requests, problems regarding TWiki? Send feedback. Ask community in the support forum.
Copyright © 1999-2026 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.