Forums / Setup & design / Display nodes with a date attribute equal to today

Display nodes with a date attribute equal to today

Author Message

Lance Leger

Friday 30 May 2003 12:34:19 am

I'm trying to display the nodes whose date attribute is equal to today.

{section name=Child loop=fetch('content','list',hash(parent_node_id,104,class_filter_type,include,class_filter_array,array(9)))}
{let a = currenttime()
b = $Child:item.data_map.date.data_int
c = sum($b,86400)}
{section show=eq(and($a|lt($c),$a|gt($b)),true)}
{$Child:item.data_map.stuff.data_text}
{/section}
{/section}
{/let}

This returns nothing... Any suggestions?

Thanks.

Paul Borgermans

Friday 30 May 2003 4:29:02 am

What are the values returned for $a,$b$c?

Just display them with something like

<p>a = {$a}</p>
...
But I would simplify the section show to

{section show=and($a|lt($c),$a|gt($b))}

and use

{$Child:item.data_map.stuff.content}

Also do an attribute show:

{$Child:item.data_map.stuff|attribute(show)}

to see if all is set right

Paul

eZ Publish, eZ Find, Solr expert consulting and training
http://twitter.com/paulborgermans