Re: [Tiki-users] Nested {LIST()}: accessing external object_id

Jonny Bradley via TikiWiki-users <[email protected]>
Newsgroups gmane.comp.cms.tiki.user
Message-ID <[email protected]>
Hi Alessandro and list plugin fans!

As Bernard said you can use smarty template files (or wiki pages) to do this, and that is very powerful, but you need to learn some smarty syntax and it's not so easy to debug sometimes, but there is a way to do it in wiki mark-up alone, just!

You can find a couple of examples here:

    http://doc.tiki.org/PluginList-display-control-block#Wiki_Plugin_Formatting

The trick is to use {display} with the wikiplugin format to run the inner list plugin - the syntax looks horrible but in the past i have managed to get it to work.

In the 2nd example the parent_object_id field is the thing a comment is attached to, in this case the tracker item being shown in the results.

Does that make any sense? Hope so!

jonny





> On 24 Jan 2021, at 17: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
>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.