Skip to the content
Documentation

'only_translated? deprecated?

No ratings yet

I noticed that all PHP code related do 'only_translated' in ezcontentobjecttreenode.php is commented out in version 4.0.0. As a result the option does not work.
Is this option on the "deprecating" way?
g

Comments (3 historical)

Written by readers of the earlier documentation sites, kept as they were.

  1. Re: 'only_translated? deprecated? => workaround

    Mickael ROBIN ·

    'only_translated' seems to work only when it is followed by 'language', 'xxx-YY'
    To filter on the current language, you can therefore use thise code :

    {def $locale = ezini( 'RegionalSettings', 'Locale', 'site.ini' )}{def $items=fetch( 'content', 'tree',                     hash( 'parent_node_id', $node.node_id',                       'only_translated', true(),                   'language', $locale ))}

    It seems to work for me :-)
    I hope this will help...

    1. Re: Re: 'only_translated? deprecated? => workaround

      xiaoleng ·

      I want to fetch all language node list, i set 'only_translated', false(), but it not work.
      I use below code:
      {def $items=fetch( 'content', 'list',
      hash( 'parent_node_id', $node.node_id' ))}
      the result is equal to:
      {def $locale = ezini( 'RegionalSettings', 'Locale', 'site.ini' )}
      {def $items=fetch( 'content', 'list',
      hash( 'parent_node_id', $node.node_id',
      'only_translated', true(),
      'language', $locale ))}
      but it is not i want.