Topic on Project:Support desk

Summary by Nanoukaplus

Use #vardefine

Nanoukaplus (talkcontribs)

Hello,

I've got a query #ask using the format template, with a template and an introtemplate. I want to display the results in a table.

{{#ask:[[Category:Objects]]
|?=name
|?date
|?user
|format=template
|namedargs=no
|introtemplate=Header search object
|template=Search Object
|outrotemplate=Table footer
}}

In my outrotemplate I only have the caracters |} In my template I display the informations of my query. In my introtemplate Header search object I want to display the columns only with certain conditions, so I have this code :

{|class = "wikitable"
{{#if:{{{1}}}|!Object's name}}
{{#if:{{{2}}}|!Date}}
...

But it didn't recognize the parameters into the balise {{{1}}},{{{2}}}.. Does anyone have a solution please ?

FriedhelmW (talkcontribs)

Put the #if outside the #ask and use different templates for each case.

Nanoukaplus (talkcontribs)

Thanks, but finally it was enough to define a variable and use it in the introtemplate :)