Author Topic

Vicente Olivan

Tuesday 22 January 2008 4:03:26 am

Comment48856

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