summaryrefslogtreecommitdiff
path: root/doc/ikiwiki
diff options
context:
space:
mode:
authorhttp://hendry.iki.fi/ <http://hendry.iki.fi/@web>2009-06-22 06:27:56 -0400
committerJoey Hess <joey@kitenet.net>2009-06-22 06:27:56 -0400
commit2b722cfd689f789b786624c36046f8992fabefe9 (patch)
tree598eb7ce6d8857924797e4b590097c35ccc1cf6c /doc/ikiwiki
parent9cd86bc2db838bb2f0191dfcec9125ba222615a5 (diff)
templating question
Diffstat (limited to 'doc/ikiwiki')
-rw-r--r--doc/ikiwiki/directive/inline/discussion.mdwn31
1 files changed, 31 insertions, 0 deletions
diff --git a/doc/ikiwiki/directive/inline/discussion.mdwn b/doc/ikiwiki/directive/inline/discussion.mdwn
index 3f62c2767..f7f091a4f 100644
--- a/doc/ikiwiki/directive/inline/discussion.mdwn
+++ b/doc/ikiwiki/directive/inline/discussion.mdwn
@@ -56,3 +56,34 @@ to nowhere for 20 bugs.« is shown inlined.
>
> So no, you can't reference template directive parameters inside inline's
> template, because it's already expanded at that point. --[[Joey]]
+
+## meta parameters are not enough
+
+I think I have the same problem as Paule, as I want extra arbitary parameters in my template.
+
+This is what I am doing currently, which makes my skin crawl. In `wgts/foo.mdwn`
+I have resorted to using AUTHORURL as the location of this widgets icon:
+
+ [[!meta authorurl="/ico/aHR0cDovL2JvbmRpLm9tdHAub3JnL3dpZGdldHMvYmF0dGVyeQ==.png" ]]
+
+In templates I have a file called `wgtlist.tmpl`:
+
+ <div class="widget">
+ <TMPL_IF NAME="AUTHORURL">
+ <img src="<TMPL_VAR AUTHORURL>" />
+ </TMPL_IF>
+ <TMPL_IF NAME="PERMALINK">
+ <a href="<TMPL_VAR PERMALINK>"><TMPL_VAR TITLE></a><br />
+ <TMPL_ELSE>
+ <a href="<TMPL_VAR PAGEURL>"><TMPL_VAR TITLE></a><br />
+ </TMPL_IF>
+ Posted <TMPL_VAR CTIME>
+ </div>
+
+My index page has:
+
+ [[!inline pages="./wgts/*" show=5 feeds=no actions=no rootpage="wgts" archive="yes" template=wgtlist]]
+
+Else can you please suggest a smarter way of getting certain data out from pages for a inline index?
+
+--[[hendry]]