Re: [Tiki-users] About using global variables in Wiki Template
Jonny Bradley via TikiWiki-users <[email protected]> Mon, 6 Nov 2023 14:30:06 +0000
| Newsgroups | gmane.comp.cms.tiki.user |
|---|---|
| Message-ID | <[email protected]> |
Hi Siroco
Yes! I think...
What you want is a "wiki arg var" (https://doc.tiki.org/Wiki-Argument-Variables)
The syntax would be:
{filter relation="{{itemId}}" objecttype="trackeritem" qualifier="contact.x.demand.invert"}
...where it takes {{itemId}} from the url, e.g. Your=page=name?itemId=42
Note: there's a pref you need to enable on the Editing and Plugins control panel.
Was that what you're after? HTH
jb
> On 3 Nov 2023, at 21:32, Siroco <[email protected]> wrote:
>
> Hi all,
>
> I have a question regarding the use of variables within wiki page plugins.
>
> The context:
>
> We have a template with various ListPlugins to display related content of a trackerid.
>
> {LIST()}
> {filter relation="69807" objecttype="trackeritem" qualifier="contact.x.demand.invert"}
> {OUTPUT(template="table")}
> {column label="Name" field="title_link" sort="title" translatelabel="y" mode="raw" class="text-nowrap"}
> ...
> {OUTPUT}
> {FORMAT(name="title_link")}{display name="title" format="objectlink"}{FORMAT}
> ...
> {LIST}
>
> Now, I need to edit every plugin with this trackerID.
>
> I know that I can create in my template using %variable% syntax.
>
> Is it possible to pass a variable, for example %idItemTracker%, within the plugin?
>
> For example:
>
> {LIST()}
> {filter relation="%idItemTracker%" objecttype="trackeritem" qualifier="contact.x.demand.invert"}
> {OUTPUT(template="table")}
> {column label="Name" field="title_link" sort="title" translatelabel="y" mode="raw" class="text-nowrap"}
> ...
> {OUTPUT}
> {FORMAT(name="title_link")}{display name="title" format="objectlink"}{FORMAT}
> ...
> {LIST}
>
> I've searched the Tikiwiki Plugins documentation and other Online documentation, but I don't see that this is possible.
>
> Any hint would be welcome :)
>
> src_______________________________________________
> TikiWiki-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/tikiwiki-users