Use templatebody for the templates in the basewiki and docwiki

Now that ikiwiki.info has ikiwiki (>= 3.20140916) we can do this.
master
Simon McVittie 2013-09-13 10:30:24 +01:00
parent 6d8fd9bf0d
commit f71f80bf43
5 changed files with 16 additions and 8 deletions

View File

@ -1,9 +1,11 @@
[[!templatebody <<ENDBODY
<div class="infobox"> <div class="infobox">
Available in a [[!taglink /git]] repository [[!taglink branch|/branches]].<br /> Available in a [[!taglink /git]] repository [[!taglink branch|/branches]].<br />
Branch: <TMPL_IF browse><a href="<TMPL_VAR browse>"></TMPL_IF><TMPL_VAR branch><TMPL_IF browse></a></TMPL_IF><br /> Branch: <TMPL_IF browse><a href="<TMPL_VAR browse>"></TMPL_IF><TMPL_VAR branch><TMPL_IF browse></a></TMPL_IF><br />
<TMPL_IF author>Author: <TMPL_VAR author><br /></TMPL_IF> <TMPL_IF author>Author: <TMPL_VAR author><br /></TMPL_IF>
</div> </div>
<TMPL_UNLESS branch> ENDBODY]]
This template is used to create an infobox for a git branch. It uses This template is used to create an infobox for a git branch. It uses
these parameters: these parameters:
@ -13,4 +15,3 @@ these parameters:
(e.g. github/master)</li> (e.g. github/master)</li>
<li>author - the author of the branch</li> <li>author - the author of the branch</li>
</ul> </ul>
</TMPL_UNLESS>

View File

@ -1,3 +1,4 @@
[[!templatebody <<ENDBODY
<div class="infobox"> <div class="infobox">
[[ikiwiki_logo|logo/ikiwiki.png]] [[ikiwiki_logo|logo/ikiwiki.png]]
<ul> <ul>
@ -12,3 +13,6 @@
<li><a href="http://flattr.com/thing/39811/ikiwiki">Flattr ikiwiki</a></li> <li><a href="http://flattr.com/thing/39811/ikiwiki">Flattr ikiwiki</a></li>
</ul> </ul>
</div> </div>
ENDBODY]]
This template contains the navigation links used on the front page.

View File

@ -1,11 +1,12 @@
[[!templatebody <<ENDBODY
<div class="notebox"> <div class="notebox">
<TMPL_VAR text> <TMPL_VAR text>
</div> </div>
<TMPL_UNLESS text> ENDBODY]]
Use this template to insert a note into a page. The note will be styled to 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 float to the right of other text on the page. This template has one
parameter: parameter:
<ul> <ul>
<li>`text` - the text to display in the note <li>`text` - the text to display in the note
</ul> </ul>
</TMPL_UNLESS>

View File

@ -1,3 +1,4 @@
[[!templatebody <<ENDBODY
<span class="infobox"> <span class="infobox">
Plugin: <TMPL_VAR name><br /> Plugin: <TMPL_VAR name><br />
Author: <TMPL_VAR author><br /> Author: <TMPL_VAR author><br />
@ -8,7 +9,8 @@ Currently enabled: [[!if test="enabled(<TMPL_VAR name>)" then="yes" else="no"]]<
</span> </span>
[[!if test="sourcepage(plugins/contrib/*)" then="""[[!meta title="<TMPL_VAR name> (third party plugin)"]]"""]] [[!if test="sourcepage(plugins/contrib/*)" then="""[[!meta title="<TMPL_VAR name> (third party plugin)"]]"""]]
<TMPL_IF core>[[!tag plugins/type/core]]</TMPL_IF> <TMPL_IF core>[[!tag plugins/type/core]]</TMPL_IF>
<TMPL_UNLESS name> ENDBODY]]
This template is used to create an infobox for an ikiwiki plugin. It uses This template is used to create an infobox for an ikiwiki plugin. It uses
these parameters: these parameters:
<ul> <ul>
@ -16,4 +18,3 @@ these parameters:
<li>author - the author of the plugin <li>author - the author of the plugin
<li>core - set to a true value if the plugin is enabled by default <li>core - set to a true value if the plugin is enabled by default
</ul> </ul>
</TMPL_UNLESS>

View File

@ -1,4 +1,3 @@
<TMPL_UNLESS mouseover>
Use this template to create a popup window that is displayed when the mouse 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: is over part of the page. This template has two parameters:
<ul> <ul>
@ -10,7 +9,9 @@ large for good usability.
</ul> </ul>
Note that browsers that do not support the CSS will display the popup Note that browsers that do not support the CSS will display the popup
inline in the page, inside square brackets. inline in the page, inside square brackets.
</TMPL_UNLESS>
[[templatebody <<ENDBODY
<span class="popup"><TMPL_VAR mouseover> <span class="popup"><TMPL_VAR mouseover>
<span class="paren">[</span><span class="balloon"><TMPL_VAR popup></span><span class="paren">]</span> <span class="paren">[</span><span class="balloon"><TMPL_VAR popup></span><span class="paren">]</span>
</span> </span>
ENDBODY]]