Forums / General / Fetching different classes with common attribute: still impossible in ez 3.50?

Fetching different classes with common attribute: still impossible in ez 3.50?

Author Message

Alessandro Cipriani

Monday 24 January 2005 1:22:55 am

hi all,
i saw it was quite impossible to fetch objects of different classes filtering by two different attributes, one of the first class, the other of the second class.

for example:
class article -> attribute: date;
class interview -> attribute: date;
(both the date attributes are not the publish date.)

i'd like to fetch all the articles and interviews filtering them by the date attribute.

now with 3.50 is it possible?

thanx in advance
alessandro

James Ward

Tuesday 25 January 2005 10:56:39 am

Still appears to be impossible. I think this would be an excellent feature to add.

working at www.wardnet.com
blogging at www.jamesward.ca

Antoine W.

Friday 24 June 2005 4:11:35 am

Hi,
Is it still impossible to fetch objects of different classes with attribute_filter, in eZ publish 3.6 ?

Something like:

fetch( 'content', 
       'list', 
       hash( 'parent_node_id',   42, 
          'attribute_filter', array( 'and',
                 array( 'folder/show_in_menu', '=', '1' ), 
                 array( 'article/show_in_menu', '=', '1' ) ) )

If not, it's always possible to fetch every folders & articles, and then add a condition like

<section show=is_set($node.data_map.show_in_menu)>
<section show=$node.data_map.show_in_menu|eq(1)>...display...</section>
</section>

But it will fetch everything, it's not optimised...