Forums / Setup & design / Fecth content complicated, how to?

"Please Note:
  • At the specific request of Ibexa we are changing this projects name to "Exponential" or "Exponential (CMS)" effective as of August, 11th 2025.
  • This project is not associated with the original eZ Publish software or its original developer, eZ Systems or Ibexa".

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