Help with simple template syntax please

Author Message

Arran Price

Thursday 30 December 2004 8:15:29 pm

Hi all,
Ive been working on this for hours and figure this has got to be simple and Im just missing something. Im working on some different views for the community supplied agenda template (which I think is very good btw).

Im a novice at the template language but have figured out how to loop etc.
All I want to do is figure out the syntax for getting the values of certain attributes/fields of my class ie my class name is event and it has various fields such as event_name and event_desc (as well as date_from and date_to).

How do I simply display the event_desc field value?

as said Im sure this is ridiculously simple, but Im just having no luck.

Relevant bits of my code below.

{let
chosen_month=12
chosen_day=25
chosen_year=2004
}

{* get all the events that happen on the day specified *}
{let temp_ts=makedate( $chosen_month, $chosen_day, $chosen_year )
events=fetch( 'content', 'list', hash( 'parent_node_id', 105, 'attribute_filter',
array( 'and',
array( 'event/date_from', '<=', $temp_ts),
array( 'event/date_to', '>=', $temp_ts )
) ) ) }

{*loop through all the events and display bits*}
{section loop=$events}
<p>information on item {$number}</p>
<p>{$item.url_alias|ezurl}</p>
<p>{$item.name}</p>
{* want to display the event_desc field for this object*}
{/section}

{/let}

Ɓukasz Serwatka

Thursday 30 December 2004 11:49:51 pm

 {section loop=$events}
<p>information on item {$number}</p>
<p>{$item.url_alias|ezurl}</p>
<p>{$item.name}</p>
{* want to display the event_desc field for this object*}
{attribute_view_gui attribute=$item.object.data_map.event_desc}
{/section}

BTW please use code tags

Personal website -> http://serwatka.net
Blog (about eZ Publish) -> http://serwatka.net/blog

Arran Price

Saturday 01 January 2005 11:13:45 am

thanks Luke, that worked.

and will use code tags in future.

cheers

Arran

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