X-Git-Url: http://git.vanrenterghem.biz/git.ikiwiki.info.git/blobdiff_plain/5afda336720dc83e0fd4c6e2f311ff6664c68211..dccd76487151acc6adc93ec79f1808096bc41324:/doc/templates.mdwn diff --git a/doc/templates.mdwn b/doc/templates.mdwn index 9208db0eb..d7480ee8f 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 ``. * To make a block of text conditional on a variable being set use - `text`. + `text`. * To use one block of text if a variable is set and a second if it's not, - use `textother text` + use `textother text` [[!if test="enabled(template)" then=""" ## template pages @@ -22,20 +22,22 @@ easy to learn. All you really need to know to modify templates is this: The template directive allows wiki pages to be used as templates, filled out and inserted into other pages in the wiki. """]] -[[!if test="enabled(template) and enabled(inline)" then=""" -[[!inline pages="templates/* and !*.tmpl and !*/discussion" -feeds=no archive=yes sort=title template=titlepage -rootpage=templates postformtext="Add a new template named:"]] -"""]] [[!if test="enabled(edittemplate)" then=""" -## edit templates +## default content for new pages The edittemplate directive can be used to make new pages default to -containing text from a template, which can be filled as out the page is +containing text from a template page, which can be filled as out the page is edited. """]] +[[!if test="(enabled(template) or enabled(edittemplate) +and enabled(inline)" then=""" +[[!inline pages="templates/* and !*.tmpl and !templates/*/* and !*/discussion" +feeds=no archive=yes sort=title template=titlepage +rootpage=templates postformtext="Add a new template named:"]] +"""]] + ## wiki templates These templates are used to build the wiki. The aim is to keep almost all @@ -45,8 +47,6 @@ html out of ikiwiki and in the templates. key template to customize. [[!if test="enabled(pagetemplate)" then=""" (The pagetemplate directive can be used to make a page use a different template than `page.tmpl`.)"""]] -* `misc.tmpl` - Generic template used for any page that doesn't - have a custom template. * `rsspage.tmpl` - Used for generating rss feeds for blogs. * `rssitem.tmpl` - Used for generating individual items on rss feeds. * `atompage.tmpl` - Used for generating atom feeds for blogs. @@ -73,7 +73,7 @@ html out of ikiwiki and in the templates. * `editpage.tmpl`, `editconflict.tmpl`, `editcreationconflict.tmpl`, `editfailedsave.tmpl`, `editpagegone.tmpl`, `pocreatepage.tmpl`, `editcomment.tmpl` `commentmoderation.tmpl`, `renamesummary.tmpl`, - `passwordmail.tmpl` - Parts of ikiwiki's user interface; do not - normally need to be customised. + `passwordmail.tmpl`, `openid-selector.tmpl` - Parts of ikiwiki's user + interface; do not normally need to be customised. [[!meta robots="noindex, follow"]]