eZ Community » Forums » Developer » Fetch list of nodes depending upon...
expandshrink

Fetch list of nodes depending upon language they are translated

Fetch list of nodes depending upon language they are translated

Tuesday 06 September 2011 5:58:50 pm - 2 replies

Hello All,
I am having problem in fetching the nodes depending upon siteaccess language in which they are translated . my code is  :

 {def $locale = ezini( 'RegionalSettings', 'Locale', 'site.ini' )}{def $rootNode = fetch('content','node',hash('node_id',2))<span> </span> $menuItems=fetch('content', 'list', hash('parent_node_id', $rootNode.node_id,<span> </span>'sort_by', $rootNode.sort_array,<span> </span>'class_filter_type', 'include',<span> </span>'class_filter_array', ezini('MenuContentSettings', 'TopIdentifierList', 'menu.ini'),<span> </span>'attribute_filter', array('and', array('priority','between',array(1,10))),                        'only_translated', true(),                        <span> </span>'language',$locale,                        'language_code',$locale,<span> </span>'ignore_visibility',false()))

i am not getting proper result i am getting all the nodes regardless of languages can any one please help me in this.?
Thank you,Akhilesh 

Modified on Tuesday 06 September 2011 6:03:11 pm by Akhilesh Singh

Wednesday 07 September 2011 11:58:35 am

Check settings [RegionalSettings]ShowUntranslatedObjects in site.ini.

Also make sure that the improper nodes have no "Use the main language if there is no prioritized translation." checked.

 

Kind regards

J.

Friday 09 September 2011 7:12:22 am

Hi Jaroslaw Heba,

Thank you very much for the quick an accurate help .. thanks alot happy.gif Emoticon

Akhilesh 

expandshrink

You must be logged in to post messages in this topic!

36 542 Users on board!

Forums menu