Tests the specified system parameters before displaying its content.
Checks if the categories are defined in the current context (value = 1) or not (value = 0).
Checks if the posts are defined in the current context (value = 1) or not (value = 0).
Checks if the blog language code is the same as the one given in this parameter. The language is encoded on two characters, following the ISO-369-1 norm. If the value starts with "!", checks if the blog language is different from the given value.
Checks if the blog identifier is the same as the one given in this parameter.
Checks if currently used template filename is the same as the one given in this parameter. If the value starts with "!", checks if the template filename is different from the given value.
The following example can be inserted in the _head.html file. It displays a JavaScript message box "Enjoy the reading!" before displaying the page if the post.html file is used:
<tpl:SysIf current_tpl="post.html"> <script type="text/javascript"> //<![CDATA[ alert('Enjoy the reading!'); //]]> </script> </tpl:SysIf>
Checks if the URL type is the same as the one given in this parameter. To get the opposite result, simply add "!" in front of the given value.
Checks if the specified template file exists. To get the opposite result, simply add "!" in front of the given value.
Checks if the specified tag exists. To get the opposite result, simply add "!" in front of the given value.
Checks if the comments are open (value = 1) or closed (value = 0) on the blog.
Checks if trackbacks are open (value = 1) or closed (value = 0) on the blog.
Checks if the Wiki syntax is authorized in comments (value = 1) or not (value = 0).
Checks the number of posts found by the search function. The expression looks like "<operator> <number>
" where <number>
is a chosen reference number and <operator>
one of the following values:
==
: checks that the number of posts found is equal to the reference number!=
: checks that the number of posts found is different from the reference number>=
: checks that the number of posts found is greater than or equal to the reference number<=
: checks that the number of posts found is less than or equal to the reference number>
: checks that the number of posts found is greater than the reference number<
: checks that the number of posts found is less than the reference numberThis parameters only has sense in the search.html file.
Here are the modes used by Dotclear:
Context | Mode | Template file |
---|---|---|
Error 404 | 404 | 404.html |
Homepage | default | home.html |
Next pages (when navigating from homepage) | default-page | home.html |
Search | search | search.html |
Category | category | category.html |
Archives | archive | archive.html |
Monthly archives | archive | archive_month.html |
Password protected post | default | password-form.html (a form asking the password to access this post) |
Post without a password | post | post.html |
Preview post | preview | post.html |
Page | page | page.html |
Tag | tag | tag.html |
Tags | tags | tags.html |
Feed | feed | Files rss2.xml, rss2-comments.xml, atom.xml and atom-comments.xml |
The mode is used with the current_mode
argument and the template file is used with the current_tpl
argument.
The following tags will have the same behavior:
<tpl:SysIf current_mode="404"> Erreur 404 </tpl:SysIf>
<tpl:SysIf current_tpl="404.html"> Erreur 404 </tpl:SysIf>
Wiki powered by Dokuwiki.