List article

Author Message

enigmista enigmista

Friday 25 July 2003 2:53:51 am

Hi. I want list all item in a folder. I have created a class that have an itro a date and a name. I want list the lastest 5 i have done:
{let children=fetch('content',list,hash(parent_node_id,$node.node_id))}
{section name=Child loop=$children max=5}
<img src={"images/article.gif"|ezdesign} alt="" /> <a href={concat("/content/view/full/",$Child:item.node_id)|ezurl}>{$Child:item.name}</a><br />
{/section}
{/let}

but with it it will display not the last 5 and i want print the intro.. how i can do? tnx

Bjørn Kaarstein

Friday 25 July 2003 4:37:07 am

Try to put a limit in your fetch and sort by date...

{let
children=fetch('content','list',hash(parent_node_id,$node.node_id), limit,5,sort_by,array(array(published,false())))}

Regards Bjørn

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 19:26:47
Script start
Timing: Jan 18 2025 19:26:47
Module start 'layout'
Timing: Jan 18 2025 19:26:47
Module start 'content'
Timing: Jan 18 2025 19:26:48
Module end 'content'
Timing: Jan 18 2025 19:26:48
Script end

Main resources:

Total runtime0.7046 sec
Peak memory usage4,096.0000 KB
Database Queries54

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0072 587.7891152.6094
Module start 'layout' 0.00720.0041 740.398439.4141
Module start 'content' 0.01130.6916 779.8125458.0938
Module end 'content' 0.70290.0017 1,237.90638.3516
Script end 0.7046  1,246.2578 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00400.5696160.0003
Check MTime0.00190.2664160.0001
Mysql Total
Database connection0.00110.158410.0011
Mysqli_queries0.663194.1090540.0123
Looping result0.00050.0650520.0000
Template Total0.666994.620.3334
Template load0.00220.305320.0011
Template processing0.664794.336420.3324
Template load and register function0.00020.023110.0002
states
state_id_array0.00130.190510.0013
state_identifier_array0.00120.163520.0006
Override
Cache load0.00170.2459150.0001
Sytem overhead
Fetch class attribute can translate value0.00040.058820.0002
Fetch class attribute name0.00180.253920.0009
XML
Image XML parsing0.00020.032620.0001
class_abstraction
Instantiating content class attribute0.00000.000820.0000
General
dbfile0.00070.1002100.0001
String conversion0.00000.001440.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
2content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
2content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
3content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 9
 Number of unique templates used: 5

Time used to render debug report: 0.0001 secs