| Carlos Revillo
                                                                                                                             
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     | Wednesday 05 October 2005 4:59:08 am 
                                                                
                                                                 hi. i want a list of folder. these folders are children of another one with node_id=60. but i'm trying to do a filter usin the id of the children nodes, but doesn't work for me. i'm using attribute_filter. something like this. 
{let children=fetch( content, list, hash( parent_node_id, 90,
                                     sort_by, $node.sort_array,
attribute_filter, array(array('node_id','!=',90)),
                                     class_filter_type, include,
                                     class_filter_array, array( 'bloque'  ) ) )}
any ideas? thanks. | 
                                                
                                                                                                                                                        
                                                        | Carlos Revillo
                                                                                                                             | Sunday 09 October 2005 1:28:08 am 
                                                                 
sorry. let's see... i have a folder wich node_id is, for example, 60.
 i also have three sub-folders, node_id=61, node_id=62, node_id=63.
 now i want a list of subfolders of folder with node_id=60 and i try...  
{let children=fetch( content, list, hash( parent_node_id, 60,
                                     sort_by, $node.sort_array,
                                    class_filter_type, include,
                                     class_filter_array, array( 'folder'  ) ) )}
that works for me. but now i want an attribute_filter. i want a list of subfolders wich node_id IS NOT 62. so i try 
{let children=fetch( content, list, hash( parent_node_id, 60,
                                     sort_by, $node.sort_array,
attribute_filter, array(array('node_id','!=',62)),
                                     class_filter_type, include,
                                     class_filter_array, array( 'folder'  ) ) )}
but i can't make it work. thanks. | 
                                                                                                    
                                                        | Kristof Coomans
                                                                                                                             | Sunday 09 October 2005 8:11:36 am 
                                                                 Filtering on node_id is currently not possible. But I think it wouldn't difficult to make this work. You can make an extended attribute filter, or you can patch the kernel. In <i>kernel/classes/ezcontentobjecttreenode.php</i>, somewhere around line 913, there is: 
switch ( $filterAttributeID )
{
After that, you can insert this code: case 'node_id':
{
    $filterField = 'node_id';
}break;
I think that should do it (but I didn't tested it). You can also program support for sorting on node_id in a similar way in the function createSortingSQLStrings. independent eZ Publish developer and service provider | http://blog.coomanskristof.be | http://ezpedia.org
                                                                 |