#ask inside a template

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

#ask inside a template

Pål Habberstad
Hi!

Is it possible to use an #ask inside a template and pass a parameter to
that template?

I've tried this, but it doesn't work:

Template:

{{#ask:
[[{{{1}}}] <- 1 is the variable for the pagename I'm trying to get
property values from
|?Har visningsnavn=Navn
|?Har beskrivelsse=Beskrivelse
|?Har tag=Emneknagg
}}

The result is:

{{#ask: [[Virksomhetsomrade00003] |?Har visningsnavn=Navn |?Har
beskrivelsse=Beskrivelse |?Har tag=Emneknagg }}

It understands the variable as Virksomhetsomrade00003, but it seems the
page doesn't parse the result of the template, but shows it as plain text.

Any ideas?

Thanks in advance
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Semediawiki-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/semediawiki-user
Reply | Threaded
Open this post in threaded view
|

Re: #ask inside a template

Hermann Schwärzler
Hi

there is a small but important typo:
[[{{{1}}}]
should be
[[{{{1}}}]]
*two* closing square brackets

Greetings
Hermann

On 05/21/17 23:25, Pål Habberstad wrote:

> Hi!
>
> Is it possible to use an #ask inside a template and pass a parameter to
> that template?
>
> I've tried this, but it doesn't work:
>
> Template:
>
> {{#ask:
> [[{{{1}}}] <- 1 is the variable for the pagename I'm trying to get
> property values from
> |?Har visningsnavn=Navn
> |?Har beskrivelsse=Beskrivelse
> |?Har tag=Emneknagg
> }}
>
> The result is:
>
> {{#ask: [[Virksomhetsomrade00003] |?Har visningsnavn=Navn |?Har
> beskrivelsse=Beskrivelse |?Har tag=Emneknagg }}
>
> It understands the variable as Virksomhetsomrade00003, but it seems the
> page doesn't parse the result of the template, but shows it as plain text.
>
> Any ideas?
>
> Thanks in advance
> ------------------------------------------------------------------------------
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
> _______________________________________________
> Semediawiki-user mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/semediawiki-user
>

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Semediawiki-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/semediawiki-user