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.

eZ debug

Timing: Jan 31 2025 01:30:09
Script start
Timing: Jan 31 2025 01:30:09
Module start 'layout'
Timing: Jan 31 2025 01:30:09
Module start 'content'
Timing: Jan 31 2025 01:30:09
Module end 'content'
Timing: Jan 31 2025 01:30:09
Script end

Main resources:

Total runtime0.0256 sec
Peak memory usage6,144.0000 KB
Database Queries3

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0051 588.1250151.2109
Module start 'layout' 0.00510.0042 739.3359220.6719
Module start 'content' 0.00930.0148 960.00781,009.8828
Module end 'content' 0.02410.0014 1,969.890645.9922
Script end 0.0255  2,015.8828 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.002610.2978140.0002
Check MTime0.00114.3026140.0001
Mysql Total
Database connection0.00083.016710.0008
Mysqli_queries0.00249.544730.0008
Looping result0.00000.082110.0000
Template Total0.00103.910.0010
Template load0.00083.055910.0008
Template processing0.00020.865010.0002
Override
Cache load0.00062.156410.0006
General
dbfile0.002710.475080.0003
String conversion0.00000.038340.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 1
 Number of unique templates used: 1

Time used to render debug report: 0.0001 secs