Pass parameters to an INCLUDE

  • Tip Category - Developing Wiki Applications
  • Tip Added By - RichMorin - 29 Sep 2009 - 18:55
  • Extensions Used - None
  • Useful To - Beginners
  • Tip Status - New
  • Related Topics -


You want something like a macro or a user-defined parameterized variable.


You want to write some TML which acts differently, based on how you use it.


TML INCLUDEs work quite nicely as macros. Basically, any named include argument (eg, foo="123") that doesn't match a predefined parameter can be used (eg, ...%foo%...) in the body of the include.

Here is some setup code:

   * [[][%title%]];
     %author%; %imprint%
     %IF{ "defined notes" then="<p>%notes%" }%

Here is the usage code:

%INCLUDE{"Projects/WebIncludes"  section="bl_amz"  imprint="Developer's Library"  isbn="067232685X"
  author="Chris Newman"

Known Uses

Known Limitations

See Also

BestPracticeTipsForm edit

Category Developing Wiki Applications
Topic revision: r1 - 29 Sep 2009, RichMorin - This page was cached on 17 Nov 2018 - 19:59.

The copyright of the content on this website is held by the contributing authors, except where stated elsewhere. See Copyright Statement. Creative Commons License    Legal Imprint    Privacy Policy