I totally misinterpreted what included() is supposed to be for.
This reverts commit da9e1ea667
master
parent
9d0ac3170a
commit
62fc5d0c3c
|
@ -60,14 +60,9 @@ few things:
|
|||
`<TMPL_IF variable>text</TMPL_IF>`.
|
||||
* To use one block of text if a variable is set and a second if it's not,
|
||||
use `<TMPL_IF variable>text<TMPL_ELSE>other text</TMPL_IF>`
|
||||
* Each template file included in the wiki's source will also generate a regular
|
||||
wiki page. In many cases you might want to prevent some of your template
|
||||
being interpreted for the regular page. Use the [[if]] directive with the
|
||||
`included()` test to guard the template code.
|
||||
|
||||
Here's a sample template:
|
||||
|
||||
\[[!if test="included()" then="""
|
||||
<span class="infobox">
|
||||
Name: \[[<TMPL_VAR raw_name>]]<br />
|
||||
Age: <TMPL_VAR age><br />
|
||||
|
@ -81,9 +76,6 @@ Here's a sample template:
|
|||
<TMPL_VAR notes>
|
||||
</TMPL_IF>
|
||||
</span>
|
||||
""" else="""
|
||||
This is a template page.
|
||||
"""]]
|
||||
|
||||
The filled out template will be formatted the same as the rest of the page
|
||||
that contains it, so you can include WikiLinks and all other forms of wiki
|
||||
|
|
Loading…
Reference in New Issue