From 1df13a62bf3a85f8a881e7d127cf940d14a601b5 Mon Sep 17 00:00:00 2001
From: p4bl0
- The foreach loop construct is specific to the "archives.html" and - "feed.xml" templates and will therefore be described at the same + The foreach loop construct is specific to the archives.html and + feed.xml templates and will therefore be described at the same time. Where available, the loops are processed right after the includes.
The syntax of the conditional construct is as follow:
<?fugitive ifset:var ?> - Template code which is ignored if var value is empty, and + Template code which is ignored if var value is empty, and which typically includes <code><?fugitive var ?></code>. <?fugitive endifset:var ?>
@@ -356,4 +356,21 @@ fugitive: README
*TODO*
+
+ Two foreach loops are available: foreach:article
+ and foreach:commit
. The syntax is as follow:
+
<?fugitive foreach:article ?> + Template code that will be repeated for each article and + where the values of <code>article_*</code> variables are + set in accordance with the article each time. +<?fugitive endforeach:article ?>+
<?fugitive foreach:commit ?> + Template code that will be repeated for each commit and + where the values of <code>commit_*</code> variables are + set in accordance with the commit each time. +<?fugitive endforeach:commit ?>+
+ The only difference between the archives.html and feed.xml templates is that + in feed.xml these contsructs only loop on the five last articles and commits. +
-- cgit v1.2.3