aboutsummaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorhttp://smcv.pseudorandom.co.uk/ <http://smcv.pseudorandom.co.uk/@web>2009-06-29 07:48:30 -0400
committerJoey Hess <joey@kitenet.net>2009-06-29 07:48:30 -0400
commit137c70aeb3d6f87f4ba65410dbc10f3d153fc7e7 (patch)
tree1863ffb11f65a0224d95c6a6c58e47b9e8f20509 /doc
parent2d01a51aab8753d3985b23c81cfe73cfe217d8da (diff)
downloadikiwiki-137c70aeb3d6f87f4ba65410dbc10f3d153fc7e7.tar
ikiwiki-137c70aeb3d6f87f4ba65410dbc10f3d153fc7e7.tar.gz
try using conditional?
Diffstat (limited to 'doc')
-rw-r--r--doc/ikiwiki/directive/inline/discussion.mdwn20
1 files changed, 20 insertions, 0 deletions
diff --git a/doc/ikiwiki/directive/inline/discussion.mdwn b/doc/ikiwiki/directive/inline/discussion.mdwn
index 02530ce08..be0665d04 100644
--- a/doc/ikiwiki/directive/inline/discussion.mdwn
+++ b/doc/ikiwiki/directive/inline/discussion.mdwn
@@ -73,6 +73,26 @@ to nowhere for 20 bugs.« is shown inlined.
>>
>> [[!cinlined text="""Text which can also use Parameter, bla blubb …"""]]
>> --[[PaulePanter]]
+>>> You can make the body of a page change depending on whether it's being
+>>> inlined, with the [[ikiwiki/directive/if]] directive from the
+>>> [[plugins/conditional]] plugin:
+>>>
+>>> \[[!if test="inlined()"
+>>> then="""[[!template id=productsummary
+>>> location="Warehouse 23" price=20
+>>> ]]"""
+>>> else="""[[!template id=productdetail
+>>> location="Warehouse 23" price=20
+>>> description="Every home should have one"
+>>> ]]"""
+>>> ]]
+>>>
+>>> Perhaps that does some of what you want?
+>>>
+>>> If you want to go beyond that, my inclination would be to write
+>>> a simple plugin to deal with whatever it is you want to do (bug
+>>> metadata or product metadata or whatever) rather than prematurely
+>>> generalizing. --[[smcv]]
## meta parameters are not enough