Multicalendar question

Author Message

Vicente Olivan

Friday 14 December 2007 6:39:06 am

How can I show all events in a single table?

Thanks

André R.

Saturday 15 December 2007 5:16:44 am

Could you be a bit more specific ?

Are you using the multi calendar in ezwebin, added relations to the calendars you want it to fetch events from and now you want to display all (new and old) events on one page ???

Have you tried customizing the template used?

eZ Online Editor 5: http://projects.ez.no/ezoe || eZJSCore (Ajax): http://projects.ez.no/ezjscore || eZ Publish EE http://ez.no/eZPublish/eZ-Publish-Enterprise-Subscription
@: http://twitter.com/andrerom

Vicente Olivan

Saturday 15 December 2007 6:17:20 am

I related events calendar to multicalendar, by default, displays each calendar on a table.
I´m trying show all events calendar in a single table, and can display events by category (tags), node, start date and end date.
My problem is how to develop drop-down boxes to do this.
Any suggestions to get started?
Thanks a lot

Vicente Olivan

Monday 21 January 2008 2:04:26 am

I´m trying customize multicalendar template, but not shows items

       {foreach $node.data_map.calendars.content.relation_list as $relation}

            {def $related_node = fetch( 'content', 'node', hash( 'node_id', $relation.node_id ) )
                 $related_node_children = fetch( 'content', 'list', hash( 'parent_node_id', $related_node.node_id,
                                                                           'limit', '5',
                                                                           'class_filter_type', 'include',
                                                                           'class_filter_array', array( 'event' ),
                                                                           'sort_by', array( 'attribute', true(), 'event/from_time' ) ) )}

How can I change foreach control structure for elements to be displayed in a single table?

Thanks a lot

André R.

Tuesday 22 January 2008 12:23:00 am

Skip the first fetch and append the node_id's to a array, and move the second fetch after the foreach and fetch with the array with node id's as 'parent_node_id'.

eZ Online Editor 5: http://projects.ez.no/ezoe || eZJSCore (Ajax): http://projects.ez.no/ezjscore || eZ Publish EE http://ez.no/eZPublish/eZ-Publish-Enterprise-Subscription
@: http://twitter.com/andrerom

Vicente Olivan

Tuesday 22 January 2008 4:03:26 am

Hi André

<b>Original code</b>

{foreach $node.data_map.calendars.content.relation_list as $relation}
 {def $related_node = fetch( 'content', 'node', hash( 'node_id', $relation.node_id ) )
        $related_node_children = fetch( 'content', 'list', hash( 'parent_node_id', $related_node.node_id,
                                                                           'limit', '5',
                                                                           'class_filter_type', 'include',
                                                                          'class_filter_array', array( 'event' ),
                                                                           'sort_by', array( 'attribute', true(), 'event/from_time' ) ) )}
            <h2><a href="{$related_node.url_alias|ezurl(no)}">{$related_node.name}</a></h2>
            <table class="list" border="0" cellspacing="0" cellpadding="0">
            <tr>
            ...
            </tr>
            {foreach $related_node_children as $child sequence array( 'bglight', 'bgdark' ) as $style}
            <tr class="{$style}">
            ...
            </tr>
            {/foreach}
            </table>
            {undef}
       {/foreach}

<b>Customized test code</b>

      {def $show_calendars_events=fetch( 'content', 'list',
        hash( 'parent_node_id', array( '174', '175', '176' ),
              'class_filter_type',  'include',
              'class_filter_array', array( 'folder', 'event', ),
		'sort_by', array( 'attribute', true(), 'event/from_time' ) ) )}
 

            <table class="list" border="0" cellspacing="0" cellpadding="0">
               ....
            {foreach $show_calendars_events as $child sequence array( 'bglight', 'bgdark' ) as $style}
               ....
            {/foreach}
            </table>

	{undef $show_calendars_events}

It´s works, but when somebody related others calenars not show (it´s normal)
Can you help me?

Thank you

Maximilien LELEU

Friday 28 November 2008 1:52:51 am

Hi,

Just like you, I was looking for a solution to display the events of the different calendars I created in one single calendar using "multicalendar" but I don't find any solution.

Did you manage to resolve your problem and could you give me the code you used please..?

Thanks a lot

Vicente Olivan

Friday 28 November 2008 4:50:45 am

Hi Max,

		{def $show_events_calendars=fetch( 'content', 'list', hash( 'parent_node_id', array( 'yournode1', 'yournode2', 'yournode3' ),
                           'limit', '10',
              		'class_filter_type',  'include',
             		 	'class_filter_array', array( 'folder', 'event' ),
				'sort_by', array( 'attribute', true(), 'event/from_time' )
				 ) )}
 
            		<table class="list" border="0" cellspacing="0" cellpadding="0" summary="multicalendar">
            		<tr>
                <th>{'Event'|i18n( 'design/ezwebin/full/multicalendar' )}</th>
                <th>{'Start date'|i18n( 'design/ezwebin/full/multicalendar' )}</th>
                <th>{'Category'|i18n( 'design/ezwebin/full/multicalendar' )}</th>
                <th>{'Place'|i18n( 'design/ezwebin/full/multicalendar' )}</th>
            		</tr>
            		{foreach $show_events_calendars as $child sequence array( 'bglight', 'bgdark' ) as $style}
            		<tr class="{$style}">
                <td><a href="{$child.url_alias|ezurl(no)}">{$child.name|wash()}</a></td>
                <td>{attribute_view_gui attribute=$child.data_map.from_time}</td>
                <td>{attribute_view_gui attribute=$child.data_map.category}</td>
                <td>{attribute_view_gui attribute=$child.data_map.place}</td>
            		</tr>
            		{/foreach}
            		</table>

		{undef $show_events_calendars}

Grettings

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.