Lisa Pini
|
Thursday 19 June 2008 8:36:52 am
Hi,
I've been using EZ for a few weeks, and I've been experiencing many problems with <b>heterogeneous folder</b> (folder with miscellaneus content types like articles, folders and forms together) when I try to <b>sort</b> or <b>filter</b> by attribute.
I added in every class that can be in my folder these attributes:
- <b>publish_date</b> (of type date and time)
- <b>unpublish_date</b> (of type date and time)
- <b>show_folder</b> (of type date) - <b>view_data</b> (of type checkbox)
1) <b>Order</b>
I need to order by view_data. Can I use '<b>sort_by</b>'? I read in the manual that I should add to the 'sort_by' rule the class name to order by attribute (ex: 'sort_by', array( 'attribute', true(),'article/data')), but I don't know how to use it with article, folder and form together...
2) <b>Filter role</b>
- view_data must be = 1
- if publish_date is not empty, publish_date <= now
- if unpublish_date is not empty, unpublish_date => now
How can I do it?
I read this post, but they did not help me:
http://ez.no/developer/forum/general/template_fetch_avoid_the_extended_attribute_filter
http://ez.no/developer/forum/setup_design/complex_attribute_filter_in_fetch/re_complex_attribute_filter_in_fetch
I think that I should use <b>extended_attribute_filter</b>, I tried it but my filter worked as expected when only one filter role was set. Can anyone post a code example for my case?
Thanks, Lisa
|