This site has been archived and you can no longer log in or post new messages. For up-to-date community resources please visit

eZ Community » Forums » Setup & design » Display all article of one day

Display all article of one day

Display all article of one day

Monday 21 July 2003 12:52:17 am - 3 replies

Hi there,

I'm trying to accomplish this:
I have a lot of news and I want to show them by date
Something like this:

Sunday 21 July 2003
- News 1 of 2i july 2003
- News 2 ...
- News 3 ...

Saturday 20 July 2003
- News 1 of 20 July 2003
- News 2 ...


This for a whole week.

So I need eZp to not only sort the date with fetch but to know if the date of the article is the date of the group.

Can you help me, because I dont know where to begin sad.gif Emoticon

Thank you in advance

Monday 21 July 2003 4:40:48 am

sort your fetch by date ( better set a limit parameter), that makes sure all the articles published in the same day stay together.

second, use datetime and currentdate operators to filter the lists, and then display them

Tuesday 22 July 2003 1:54:18 am

Thank you all take a look at these operators.

Wednesday 30 July 2003 4:33:33 pm

I came up with this:

{let today=currentdate()|datetime(custom,"%d%m%y"blunk.gif Emoticon startdate=0 news_list=fetch(content,tree,hash(parent_node_id,$node.node_id,limit,10,depth,3,sort_by,array(published,false()),offset,$front_news,class_filter_type,include,class_filter_array,array(31)))}
{section name=News loop=$news_list}
{switch name=Sw1 match=$News:item.object.published|datetime(custom,"%d%m%y"blunk.gif Emoticon}
{case match=$today}
Today's news
{node_view_gui view=line content_node=$News:item}
{case match=$startdate}
{node_view_gui view=line content_node=$News:item}
News of {$News:item.object.published|datetime(custom,"%d%m%y"blunk.gif Emoticon}
{node_view_gui view=line content_node=$News:item}
<table class="layout" width="100%" align="center" border="0" cellpadding="0" cellspacing="0"><tr><td height="1" background={"blueline.gif"|ezimage}></td></tr></table>
{set startdate=$News:item.object.published|datetime(custom,"%d%m%y"blunk.gif Emoticon}

But the line
{set startdate=$News:item.object.published|datetime(custom,"%d%m%y"blunk.gif Emoticon}

is giving me problem!

I get this error:
Variable 'News:startdate' doesn't exist, cannot set

What's the meaning of this error? And how can I solve this?

Modified on Wednesday 30 July 2003 5:33:13 pm by John van der Boom


You must be logged in to post messages in this topic!

36 542 Users on board!

Forums menu

Proudly Developed with from