referenced content list

View: New views
4 Messages — Rating Filter:   Alert me  

referenced content list

by Thomas Duffey :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


Hi All,

What is the suggested method for getting a list of related Content  
nodes for a node with a "dataUUIDMultiSelect" control?  I'm looking  
through code but not finding anything high level enough to be used in  
something like a JSP without a bunch of Java code.  Maybe it has yet  
to be written?

Cheers,

Tom


----------------------------------------------------------------
For list details see
http://www.magnolia-cms.com/home/community/mailing-lists.html
To unsubscribe, E-mail to: <user-list-unsubscribe@...>
----------------------------------------------------------------


Re: referenced content list

by Philipp Bärfuss :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


The util class you might have searched for:  
info.magnolia.module.data.util.DataUtil

Philipp

On 30.06.2009, at 00:48, Thomas Duffey wrote:

>
> Hi All,
>
> What is the suggested method for getting a list of related Content  
> nodes for a node with a "dataUUIDMultiSelect" control?  I'm looking  
> through code but not finding anything high level enough to be used  
> in something like a JSP without a bunch of Java code.  Maybe it has  
> yet to be written?
>
> Cheers,
>
> Tom
>
>
> ----------------------------------------------------------------
> For list details see
> http://www.magnolia-cms.com/home/community/mailing-lists.html
> To unsubscribe, E-mail to: <user-list-unsubscribe@...>
> ----------------------------------------------------------------

Best regards,

Philipp Bärfuss
Magnolia International Ltd.

---------------------------------------
  Meet us at the Magnolia Conference
  http://www.magnolia-cms.com/conference
---------------------------------------

Magnolia®  - Simple Open Source Content Management


----------------------------------------------------------------
For list details see
http://www.magnolia-cms.com/home/community/mailing-lists.html
To unsubscribe, E-mail to: <user-list-unsubscribe@...>
----------------------------------------------------------------


Re: referenced content list

by Thomas Duffey :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message



On Jun 30, 2009, at 4:53 AM, Philipp Bärfuss wrote:

> The util class you might have searched for:  
> info.magnolia.module.data.util.DataUtil

Right...found that but nothing to easily use it in a template.  
STKUtil has a getReferencedContent() method for a 1:1 relationship.  
Does it make sense to add getReferencedContentList() ?  If so I will  
submit the patch.

Tom

> On 30.06.2009, at 00:48, Thomas Duffey wrote:
>
>> Hi All,
>>
>> What is the suggested method for getting a list of related Content  
>> nodes for a node with a "dataUUIDMultiSelect" control?  I'm looking  
>> through code but not finding anything high level enough to be used  
>> in something like a JSP without a bunch of Java code.  Maybe it has  
>> yet to be written?



----------------------------------------------------------------
For list details see
http://www.magnolia-cms.com/home/community/mailing-lists.html
To unsubscribe, E-mail to: <user-list-unsubscribe@...>
----------------------------------------------------------------


Re: referenced content list

by Philipp Bärfuss :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


>> The util class you might have searched for:  
>> info.magnolia.module.data.util.DataUtil
>
> Right...found that but nothing to easily use it in a template.  
> STKUtil has a getReferencedContent() method for a 1:1 relationship.  
> Does it make sense to add getReferencedContentList() ?  If so I will  
> submit the patch.

Hm, but this method should be added to the DataUtil but not into the  
STKUtil. But the following should work too:

[#assign hm = ctx.getHierarchyManger('data')]

[#list content.name?children as valueNode]
   [#assign referencedNode = hm.getContentByUUID(valueNode.name)]
   referenced node: ${referencedNode.@path}
[/#list]

Philipp
Magnolia International Ltd.

---------------------------------------
  Meet us at the Magnolia Conference
  http://www.magnolia-cms.com/conference
---------------------------------------

Magnolia®  - Simple Open Source Content Management


----------------------------------------------------------------
For list details see
http://www.magnolia-cms.com/home/community/mailing-lists.html
To unsubscribe, E-mail to: <user-list-unsubscribe@...>
----------------------------------------------------------------