Fecth content complicated, how to?

Author Message

Daniele Nocentini

Wednesday 20 April 2005 1:37:37 am

I'have this node structure:

.race (folder class)
   .january (folder class)
   .february
   .march
      .race1 (my custom class)
      .race2 (my custom class)
      .etc
etc...

In my race custom class I've a attribute date for the race, I want to fetch all race by the current month and sort by this date attribute.
This is It's very hard for me, anyone can help me?!

Antica Bottega Digitale srl
http://www.abd.it

Ɓukasz Serwatka

Wednesday 20 April 2005 7:06:45 am

Hi Daniele,

Replace:
CLASS_ID with your custom class
ATTR_ID with id of your date datatype attribute
DATE, you can us
http://ez.no/ez_publish/documentation/reference/template_operators/formatting/datetime
http://ez.no/ez_publish/documentation/customization/tips_tricks/date_and_time_formats

fetch( content, tree, hash( parent_node_id, RACE_NODE_ID,
                            class_filter_type,  include,
                            class_filter_array, array( CLASS_ID ),
                            sort_by, array( 'attribute', false(), 'ATTR_ID' ),
                            attribute_filter, array( array( 'ATTR_ID', '=', 'DATE' ) ) ) )

I hope it will help.

Personal website -> http://serwatka.net
Blog (about eZ Publish) -> http://serwatka.net/blog

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 19 2025 04:39:12
Script start
Timing: Jan 19 2025 04:39:12
Module start 'layout'
Timing: Jan 19 2025 04:39:12
Module start 'content'
Timing: Jan 19 2025 04:39:12
Module end 'content'
Timing: Jan 19 2025 04:39:12
Script end

Main resources:

Total runtime0.0145 sec
Peak memory usage2,048.0000 KB
Database Queries3

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0058 589.1797152.6250
Module start 'layout' 0.00580.0028 741.804739.4453
Module start 'content' 0.00860.0041 781.250089.4609
Module end 'content' 0.01270.0017 870.710930.3047
Script end 0.0144  901.0156 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.002416.4681140.0002
Check MTime0.00107.1037140.0001
Mysql Total
Database connection0.00085.488810.0008
Mysqli_queries0.002919.987830.0010
Looping result0.00000.097210.0000
Template Total0.00149.610.0014
Template load0.00074.851110.0007
Template processing0.00074.740710.0007
Override
Cache load0.00053.532910.0005
General
dbfile0.00032.214680.0000
String conversion0.00000.072540.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 1
 Number of unique templates used: 1

Time used to render debug report: 0.0001 secs