fetching only articles

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

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.

eZ debug

Timing: Jan 18 2025 11:34:35
Script start
Timing: Jan 18 2025 11:34:35
Module start 'layout'
Timing: Jan 18 2025 11:34:35
Module start 'content'
Timing: Jan 18 2025 11:34:36
Module end 'content'
Timing: Jan 18 2025 11:34:36
Script end

Main resources:

Total runtime1.6125 sec
Peak memory usage4,096.0000 KB
Database Queries70

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0054 589.0469152.6250
Module start 'layout' 0.00540.0033 741.671939.4609
Module start 'content' 0.00871.6022 781.1328665.2109
Module end 'content' 1.61100.0015 1,446.343816.1719
Script end 1.6124  1,462.5156 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00350.2160160.0002
Check MTime0.00150.0941160.0001
Mysql Total
Database connection0.00070.042110.0007
Mysqli_queries1.540995.5574700.0220
Looping result0.00080.0483680.0000
Template Total1.573097.620.7865
Template load0.00210.129220.0010
Template processing1.570997.422320.7855
Template load and register function0.00020.012510.0002
states
state_id_array0.00080.047710.0008
state_identifier_array0.00120.076620.0006
Override
Cache load0.00190.1187920.0000
Sytem overhead
Fetch class attribute can translate value0.00060.039640.0002
Fetch class attribute name0.00120.075790.0001
XML
Image XML parsing0.00180.114140.0005
class_abstraction
Instantiating content class attribute0.00000.0013100.0000
General
dbfile0.00110.0700290.0000
String conversion0.00000.000540.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1node/view/full.tplfull/forum_topic.tplextension/sevenx/design/simple/override/templates/full/forum_topic.tplEdit templateOverride template
6content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
8content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
7content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
4content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 27
 Number of unique templates used: 6

Time used to render debug report: 0.0001 secs