diff options
author | Joey Hess <joey@kitenet.net> | 2010-05-05 21:08:41 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2010-05-05 21:10:40 -0400 |
commit | f52f395437a946478da2a126015c05e3e0afdc1f (patch) | |
tree | f98f451642691cc9d6aef6a0a7e524347eb7c72e /doc | |
parent | 11937595687df86aa93502d2e895f747a6262c4c (diff) |
consistently drop NAME= in templates
also add template syntax smoke test
Diffstat (limited to 'doc')
-rw-r--r-- | doc/ikiwiki/directive/template.mdwn | 8 | ||||
-rw-r--r-- | doc/templates.mdwn | 4 | ||||
-rw-r--r-- | doc/templates/gitbranch.mdwn | 2 | ||||
-rw-r--r-- | doc/templates/note.mdwn | 2 | ||||
-rw-r--r-- | doc/templates/plugin.mdwn | 2 | ||||
-rw-r--r-- | doc/templates/popup.mdwn | 2 |
6 files changed, 10 insertions, 10 deletions
diff --git a/doc/ikiwiki/directive/template.mdwn b/doc/ikiwiki/directive/template.mdwn index 052ca7873..6c50fa32e 100644 --- a/doc/ikiwiki/directive/template.mdwn +++ b/doc/ikiwiki/directive/template.mdwn @@ -53,21 +53,21 @@ few things: * To insert the raw value of a variable, with wiki markup not yet converted to html, use `<TMPL_VAR raw_variable>`. * To make a block of text conditional on a variable being set use - `<TMPL_IF NAME="variable">text</TMPL_IF>`. + `<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 NAME="variable">text<TMPL_ELSE>other text</TMPL_IF>` + use `<TMPL_IF variable>text<TMPL_ELSE>other text</TMPL_IF>` Here's a sample template: <span class="infobox"> Name: \[[<TMPL_VAR raw_name>]]<br /> Age: <TMPL_VAR age><br /> - <TMPL_IF NAME="color"> + <TMPL_IF color> Favorite color: <TMPL_VAR color><br /> <TMPL_ELSE> No favorite color.<br /> </TMPL_IF> - <TMPL_IF NAME="notes"> + <TMPL_IF notes> <hr /> <TMPL_VAR notes> </TMPL_IF> diff --git a/doc/templates.mdwn b/doc/templates.mdwn index 2444cf14d..8f6561fcf 100644 --- a/doc/templates.mdwn +++ b/doc/templates.mdwn @@ -12,9 +12,9 @@ easy to learn. All you really need to know to modify templates is this: * To insert the value of a template variable, use `<TMPL_VAR variable>`. * To make a block of text conditional on a variable being set use - `<TMPL_IF NAME="variable">text</TMPL_IF>`. + `<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 NAME="variable">text<TMPL_ELSE>other text</TMPL_IF>` + use `<TMPL_IF variable>text<TMPL_ELSE>other text</TMPL_IF>` [[!if test="enabled(template)" then=""" ## template pages diff --git a/doc/templates/gitbranch.mdwn b/doc/templates/gitbranch.mdwn index fcce925d9..962420940 100644 --- a/doc/templates/gitbranch.mdwn +++ b/doc/templates/gitbranch.mdwn @@ -3,7 +3,7 @@ Available in a [[!taglink /git]] repository.<br /> Branch: <TMPL_VAR branch><br /> Author: <TMPL_VAR author><br /> </span> -<TMPL_UNLESS NAME="branch"> +<TMPL_UNLESS branch> This template is used to create an infobox for a git branch. It uses these parameters: diff --git a/doc/templates/note.mdwn b/doc/templates/note.mdwn index 4cc323c0e..9ef5ad942 100644 --- a/doc/templates/note.mdwn +++ b/doc/templates/note.mdwn @@ -1,7 +1,7 @@ <div class="notebox"> <TMPL_VAR text> </div> -<TMPL_UNLESS NAME="text"> +<TMPL_UNLESS text> Use this template to insert a note into a page. The note will be styled to float to the right of other text on the page. This template has one parameter: diff --git a/doc/templates/plugin.mdwn b/doc/templates/plugin.mdwn index c1d1974d6..322c49445 100644 --- a/doc/templates/plugin.mdwn +++ b/doc/templates/plugin.mdwn @@ -8,7 +8,7 @@ Currently enabled: [[!if test="enabled(<TMPL_VAR name>)" then="yes" else="no"]]< </span> [[!if test="sourcepage(plugins/contrib/*)" then="""[[!meta title="<TMPL_VAR name> (third party plugin)"]]"""]] <TMPL_IF core>[[!tag plugins/type/core]]</TMPL_IF> -<TMPL_UNLESS NAME="name"> +<TMPL_UNLESS name> This template is used to create an infobox for an ikiwiki plugin. It uses these parameters: <ul> diff --git a/doc/templates/popup.mdwn b/doc/templates/popup.mdwn index b355daa2e..92455eb21 100644 --- a/doc/templates/popup.mdwn +++ b/doc/templates/popup.mdwn @@ -1,4 +1,4 @@ -<TMPL_UNLESS NAME="mouseover"> +<TMPL_UNLESS mouseover> Use this template to create a popup window that is displayed when the mouse is over part of the page. This template has two parameters: <ul> |