Re: [Tiki-users] Nested {LIST()}: accessing external object_id
Alessandro Martinelli <[email protected]>
| Newsgroups | gmane.comp.cms.tiki.user |
|---|---|
| Message-ID | <[email protected]> |
Hi Jonny and Bernard, thanks to both of you.
Btw as long as I can I prefer to stick to Wiki Syntax, so I've started
using Wiki Plugin Formatting and I'm very happy with it ^^
Alessandro
Il 25/01/2021 18:38, Jonny Bradley via TikiWiki-users ha scritto:
> 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
>>
>
>
> _______________________________________________
> TikiWiki-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/tikiwiki-users