Fetch object for all available languages

Author Message

Codeforest Smith

Friday 19 August 2011 5:38:46 am

Hi Guys,

I have a NodeID and want to get the name attribute of its ParentNodeID (which is folder) in all available languages.

Is it possible?

 

Thanks in advance

http://codeforest.net

Daniel A. Øien

Saturday 20 August 2011 4:19:41 am

I haven't tested this fully, but it should look something like this:

{def $lnode=array()}
{foreach $node.parent.object.available_languages as $language}
{set $lnode=fetch('content', 'node', hash('node_id', $node.parent.node_id, 'language_code', $language))}
{$lnode.name}
{/foreach}

Daniel A. Øien
Open Concept SA, Norway
Web: http://openconcept.no/
In English: http://openconcept.no/eng

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.