aboutsummaryrefslogtreecommitdiff
path: root/ratatoeskr/templates/src/usertemplates/some_useful_tags
diff options
context:
space:
mode:
Diffstat (limited to 'ratatoeskr/templates/src/usertemplates/some_useful_tags')
-rw-r--r--ratatoeskr/templates/src/usertemplates/some_useful_tags20
1 files changed, 20 insertions, 0 deletions
diff --git a/ratatoeskr/templates/src/usertemplates/some_useful_tags b/ratatoeskr/templates/src/usertemplates/some_useful_tags
new file mode 100644
index 0000000..091e969
--- /dev/null
+++ b/ratatoeskr/templates/src/usertemplates/some_useful_tags
@@ -0,0 +1,20 @@
+<ste:comment>
+<ste:current_section /> returns the current section name. If the current viewed site is a single article it will return the articles section name. If the section could not be determined, nothing will be returned.
+</ste:comment>
+<ste:mktag name="current_section">
+ <ste:if>
+ $current[section]
+ <ste:then>$current[section][name]</ste:then>
+ <ste:else>
+ <ste:if>
+ $current[article]
+ <ste:then>$current[article][section][name]</ste:then>
+ </ste:if>
+ </ste:else>
+ </ste:if>
+</ste:mktag>
+<ste:mktag name="menu_elem" mandatory="section|current_section">
+ <li?{~{$_tag_parameters[current_section]|eq|$_tag_parameters[section]}| class="active"|}>
+ <a href="$rel_path_to_root/$language/<ste:escape>$_tag_parameters[section]</ste:escape>"><ste:tagcontent /></a>
+ </li>
+</ste:mktag> \ No newline at end of file