Re: [Tiki-users] Nested {LIST()}: accessing external object_id
Bsfez Tiki via TikiWiki-users <[email protected]>
| Newsgroups | gmane.comp.cms.tiki.user |
|---|---|
| Message-ID | <[email protected]> |
Hello Alessandro,
To nest list plugin I use templates with a wikiplugin.
Something like:
{LIST()}
{filter content="22" field="tracker_id"}
{sort mode="tracker_field_productsboughtCustomer_asc"}
{output template="orders_list.tpl"}
{LIST}
then in the orders_list.tpl I use a wikiplugin list to search in a different tracker and return it in another template (in this case I wanted to be designed)
You do it like this on and on.
{foreach from=$results item=row}
blablabla…
{$row.object_id}
{$row.name}
{if $row.paid}
{wikiplugin _name=list}
{literal}
{filter content="11" field="tracker_id"}
{filter relation="{/literal}{$row.object_id}{literal}" objecttype="trackeritem" qualifier="id.payment.ordered.invert"}
{output(template="paymentsStage_tags.tpl")}
{/literal}
{/wikiplugin}
{else}
more blabla
{/foreach}
Hope this help.
Bernard
> On 24 Jan 2021, at 19:12 , Alessandro Martinelli <[email protected]> wrote:
>
> Hi,
>
> I'd like to know if there is a way of using nested {LIST()} and having access to the 'object_id' of the external {LIST()} in the internal one.
>
>
> Here is an example:
>
> Suppose I have a tracker with fields
>
> ArticleName (text field)
>
> ParentArticle (item link field whose values are picked up from 'ArticleName')
>
> ArticleContent (text area)
>
>
> So, if I have the following records
>
> ArticleName ParentArticle ArticleContent
>
> "Car" "" ...
>
> "Blue Car" "Car" ...
>
> "Red Car" "Car" ...
>
>
> I'd like to have the following
>
> Car
>
> Blue Car
>
> Red Car
>
>
> And so on. I've tried using something like this:
>
> {LIST()}
> {filter field="tracker_id" content="26"}
> {filter field="tracker_field_parentArticle_text" exact=""}
> {sort mode="tracker_field_parentArticle_asc"}
> *[ArticleTemplate?itemId={display name="object_id"}|{display name="tracker_field_articleName"}]
> {LIST()}
> {filter field="tracker_id" content="26"}
> {filter field="tracker_field_parentArticle" content="parent_object_id"}
> *[ArticleTemplate?itemId={display name="object_id"}|{display name="tracker_field_articleName"}]
> {LIST}
> {LIST}
>
>
> But I can't get it to work. I'm not even sure of what 'parent_object_id' is meant for, I've found it here http://doc.tiki.org/PluginList but I can't understand it.
>
> Could you please give me some hint?
>
> Please note I'm aware of the existence of the 'structure' Tiki feature, but I don't think they provide what I'm looking for.
>
> Thank you
>
> Alessandro
>
>
>
>
>
> _______________________________________________
> TikiWiki-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/tikiwiki-users
_______________________________________________
TikiWiki-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/tikiwiki-users