Help talk:Argument declaration in templates

From semantic-mediawiki.org

Further explanation requested[edit]

This looks like a useful piece of functionality but it's a bit opaque to this newbie. In what context are these arguments/parameters valid? And how, where, and when would you use them?

Does this mean that for each page that uses this special template block, the template can automatically add and set a SMW attribute from each parameter referenced by the template? I tried to use it in this way, but once I have, I can't query the parameter in the usual ways (#show and #ask) from other pages, so I don't think it's working.

Pjrich 00:52, 28 October 2011 (CEST)

Contents

Thread titleRepliesLast modified
can't handle the template parameters016:09, 23 July 2014

can't handle the template parameters

if i deliver some parameters into a template, and this template uses these parameters as property values. This dones't work.


for example:

template:foo

{{#declare:property1={{{arg1}}}
|property2={{{arg2}}}
}}

[[property3::{{{arg3}}}]]

{{#set:property4={{{arg4}}} }}

page "sandbox" using this template

{{foo|arg1=one|arg2=two|arg3=three|arg4=four}}

and when i "special:browse" this page "sandbox"

i can only find the property3 and property4,which means declare is not functional.

16:09, 23 July 2014