Christian BELLET
|
Friday 13 June 2008 8:46:45 am
Hello, I noticed a problem in the EZ Calendar. The problem is due to the fetch function and the more precisely to the attribute_filter that only displays an event if from_time OR to_time is during the current month display in the frontend.
{def $events=fetch( 'content', 'list', hash(
'parent_node_id', $event_node_id,
'sort_by', array( 'attribute', true(), 'event/from_time'),
'class_filter_type', 'include',
'class_filter_array', array( 'event' ),
'main_node_only', true(),
'attribute_filter',
array( 'or',
array( 'event/from_time', 'between', array( sum($first_ts,1), sub($last_ts,1) )),
array( 'event/to_time', 'between', array( sum($first_ts,1), sub($last_ts,1) )) )
))
$url_reload=concat( $event_node.url_alias, "/(day)/", $temp_today, "/(month)/", $temp_month, "/(year)/", $temp_year, "/offset/2")
$url_back=concat( $event_node.url_alias, "/(month)/", sub($temp_month, 1), "/(year)/", $temp_year)
$url_forward=concat( $event_node.url_alias, "/(month)/", sum($temp_month, 1), "/(year)/", $temp_year)
}
where array( sum($first_ts,1) = 1st day of the month and sub($last_ts,1) = first day of the next month I tried this but it doesn't solve my problem
{def $events=fetch( 'content', 'list', hash(
'parent_node_id', $event_node,
'sort_by', array( 'attribute', true(), 'event/from_time' ),
'class_filter_type', 'include',
'class_filter_array', array( 'event' ),
'main_node_only', true(),
'attribute_filter',
array( 'and', array('event/from_time', '<', sum($first_ts,1)), array('event/to_time', '>', sub($last_ts,1)) )
))
$url_reload=concat("/content/view/full/", $event_node,"/day/",$temp_today,"/month/",$temp_month,"/year/",$temp_year, "/offset/2")
$url_back=concat("/content/view/full/", $event_node, "/month/", sub($temp_month, 1), "/year/", $temp_year)
$url_forward=concat("/content/view/full/", $event_node, "/month/", sum($temp_month, 1), "/year/", $temp_year)
}
because it only displays what is missing in the first code and I can't mix AND + OR Anyone as a working function so I can get a working calendar ? Thanks Christian
|