Author
|
Message
|
Kaiko Kaur
|
Friday 21 March 2003 12:06:57 am
Hi
I'd like to fetch only articles.
I have now:
{let X=fetch('content','list', hash(
parent_node_id,$node.node_id,
sort_by,$node.sort_array,
offset, $view_parameters.offset)) }
It includes also Folders for me. I'd like to use it later in my template like:
{$X.0.name}
... or something like that. Anyway... without {section ...}! Is this possible? And if it is, then how?
|
Sergiy Pushchin
|
Friday 21 March 2003 1:00:44 am
{let X=fetch('content','list', hash(
parent_node_id,$node.node_id,
sort_by,$node.sort_array,
offset, $view_parameters.offset,
class_filter_type, 'include',
class_filter_array, array( 2 ) )) } Where 2 is you article class ID
|
Kaiko Kaur
|
Friday 21 March 2003 3:19:32 am
> {let X=fetch('content','list', hash(
> parent_node_id,$node.node_id,
> sort_by,$node.sort_array,
> offset, $view_parameters.offset,
> class_filter_type, 'include',
> class_filter_array, array( 2 ) ))
> }
> > Where 2 is you article class ID Thank you... it works! but I can't see logic! Can you give me this very shortly!? Let's say... if I want now only Folders or Images? What should I do then?
|
Sergiy Pushchin
|
Friday 21 March 2003 5:32:47 am
> > {let X=fetch('content','list', hash(
> > parent_node_id,$node.node_id,
> > sort_by,$node.sort_array,
> > offset, $view_parameters.offset,
> > class_filter_type, 'include',
> > class_filter_array, array( 2 ) ))
> > }
> >
> > Where 2 is you article class ID
>
> Thank you... it works! but I can't see logic! Can you give
> me this very shortly!? Let's say... if I want now only
> Folders or Images? What should I do then?
logic are:
first parameter 'class_filter_type' can be either 'include' or 'exclude'. If the value is 'include' then it will fetch only objects of classes from
class_filter_array (there are classID's in that array not class names), if the value is exclude that it exludes from result objects of classes from list.
For your example:
{let X=fetch('content','list', hash(
parent_node_id,$node.node_id,
sort_by,$node.sort_array,
offset, $view_parameters.offset,
class_filter_type, 'include',
class_filter_array, array( 1, 5 ) ))
} I don't exactly remember class id for images but I think it is 5
|
Martin Burger
|
Friday 21 March 2003 8:44:05 am
> {let X=fetch('content','list', hash(
> parent_node_id,$node.node_id,
> sort_by,$node.sort_array,
> offset, $view_parameters.offset,
> class_filter_type, 'include',
> class_filter_array, array( 2 ) ))
> }
> > Where 2 is you article class ID Where is this fetch "method" documented? Thanks, Martin
http://www.netbeyond.de/
|
Paul Borgermans
|
Friday 21 March 2003 9:49:41 am
> > {let X=fetch('content','list', hash(
> > parent_node_id,$node.node_id,
> > sort_by,$node.sort_array,
> > offset, $view_parameters.offset,
> > class_filter_type, 'include',
> > class_filter_array, array( 2 ) ))
> > }
> >
> > Where 2 is you article class ID
>
> Where is this fetch "method" documented?
> > Thanks, Martin http://ezwiki.blanko.info/index.php/3XHT_FetchFunction
eZ Publish, eZ Find, Solr expert consulting and training
http://twitter.com/paulborgermans
|