Forums / General / How to display related content?
John Bett
Thursday 27 August 2009 10:46:37 am
Hello
I have a related content object. It shows up in the Relations table. How do I print this to the screen from my override template?
I'm running Exponential version 4.
Robin Muilwijk
Sunday 06 September 2009 12:02:02 am
Hi John,
The only thing I could find on the documentation pages was the following: http://ez.no/doc/ez_publish/technical_manual/4_x/reference/datatypes/keywords
You got me curious, so I'm looking around a bit more for a full example. If I find something, i'll be sure to post that here also.
Regards Robin
Edit1: I found some more links to resources here: http://ezpedia.org/en/ez/related_objectsEdit2: http://ezpedia.org/en/snippet/template_logic_to_fetch_using_an_attribute_filter_using_the_like_condition
Board member, eZ Publish Community Project Board - Member of the share.ez.no team - Key values: Openness and Innovation. LinkedIn: http://nl.linkedin.com/in/robinmuilwijk // Twitter: http://twitter.com/i_robin // Skype: robin.muilwijk
Łukasz Serwatka
Monday 07 September 2009 12:38:12 am
Hi,
Keyword related content you can access on attribute level like:
{foreach $node.data_map.KEYWORD_ATTR_NAME.content.related_objects as $related_object} <a href="{$related_object.url_alias|ezurl( 'no' )}" title="{$related_object.name|wash()}">{$related_object.name|wash()}</a><br /> {/foreach}
Personal website -> http://serwatka.net Blog (about eZ Publish) -> http://serwatka.net/blog
Monday 07 September 2009 11:43:19 am
Hi Łukasz,
The code you share, where would one put that, in a template file? I'm still a bit of an eZ noob, trying to learn more.
Thanks, Robin
Monday 07 September 2009 1:55:51 pm
Yes, you have to put that code in template. Remember replace KEYWORD_ATTR_NAME with attribute identifier which is a Keyword datatype.
John Moritz
Friday 11 September 2009 2:22:38 pm
I was searchin for a similar solution. Found out that i can get related content with:
{def $node_of_related_content = $node.object.data_map.YOUR_IDENTIFIER.content.relation_list.0.node_id} {def $related_content=fetch( 'content', 'node', hash( 'node_id', $node_of_related_content ) )} {$related_content.name}
With this you can also reach the data_map of the related content with $related_content.data_map.
razibur rahman
Friday 25 September 2009 4:19:46 am
To make it as simple as possible to find the desired content in Internet typically "related content" is shown in the context of a given topic. So context dependent contact information, related products, further news and downloads can be better found by users and visitors. The SharePoint Content Relationship Management System by Layer2 enables editors to define relationships between SharePoint items and documents and provides a very flexible way, to display related content using the SharePoint Related Content Web Part.SharePoint Related Content Web Part - Overview
* Features & benefits * Free registration and evaluation download * How to buy this product * FAQs * Product description
Features & Benefits
To make it as simple as possible to find the desired content in Internet typically "related content" is shown in the context of a given topic. So context dependent contact information, related products, further news and downloads can be better found by users and visitors.The SharePoint Content Relationship Management System by Layer2 enables editors to define relationships between SharePoint items and documents and provides a very flexible way, to display related content using the SharePoint Related Content Web Part.
[URL=http://kerjakeras.com/mengembalikan-jati-diri-bangsa/]Mengembalikan Jati Diri Bangsa[/URL]|[URL=http://kerjakeras.com/kenali-dan-kunjungi-objek-wisata-di-pandeglang/]Kenali Dan Kunjungi Objek Wisata Di Pandeglang[/URL]