Forums / Developer / agenda

agenda

Author Message

Rinze Cats

Monday 03 May 2004 6:52:12 am

hi, I am trying to implement the agenda V1.0 http://www.ez.no/community/contributions/applications/agenda_v1_0

I am having some trouble getting is to work. it is illustrated by the follwing fetch

{let children=fetch( 'content', 'list_count', hash(
			'parent_node_id', 47,
	 		'attribute_filter', array('agenda/date_from', '<=', $selectedday ) ) )}

I want to fetch all instances of the agenda class that have the date_from attribute smaller than the selected date. This date is build using:

selectedday=cond( and(ne($view_parameters.month, ''), ne($view_parameters.day, ''), ne($view_parameters.year, '')), makedate($view_parameters.month, $view_parameters.day, $view_parameters.year), currentdate() )

the page is called using: content/view/full/47/month/5/year/2004/day/3

when i print the data_int from the date_from attribute field of my agenda items, the timestamp looks identical to selectedday, but the fetch count is always 0.

Can anybody tell me what is going on. The standard code from agenda V1.0 gives me the same problem, the count is always 0 and therefore the calender never show any links!.

thanx for any pointers you can give me!

Rinze Cats

Tuesday 04 May 2004 6:16:48 am

this is driving me crazy! Please help!
what can be the reason that this code isn't working?

{let my_ts=makedate( $month, $number, $year )
		events=fetch( 'content', 'list_count', hash(
			'parent_node_id', 47,
	 		'attribute_filter', array('agendaitem/date_from', '<=', $my_ts 
) ) ) }

agendaitem is then identifier of my class and date_from is a datefield. $events is always zero!

kind regards, rinze

Stefano Guandalini

Sunday 06 June 2004 8:18:57 am

I'm using this piece of code that is actually working:

{let    temp_ts=makedate( $view_parameters.month, $view_parameters.day, $view_parameters.year )
        events=fetch( 'content', 'list', hash( 'parent_node_id', 247,
                                'attribute_filter',
                                array( 'and',
                                        array( 'event/date_from', '<=', $temp_ts ),
                                        array( 'event/date_to', '>=', $temp_ts )
) ) ) }

Maybe try to put $view_parameters. in front oh month, day and year.

Bye.

guandalf

Stefano Guandalini
http://www.nizan.net