Forums / Developer / Template section loop, dunno how to get data I want

Template section loop, dunno how to get data I want

Author Message

Peter Bailey

Tuesday 01 April 2003 8:29:49 am

Hey all

Apologies for my 'newness' still with templating. I have this loop

{section name=Child loop=$children}
<div>
<h2>{node_view_gui view=text content_node=$Child:item}</h2>
<p>{$Child:item}</p>
<p><a href={concat('content/view/full/',$Child:item.node_id)|ezurl}>Read More...</a></p>
</div>
{/section}

See where it I'm putting in {$Child:item}? Well, that tells me that it's a "Object(ezcontentobjecttreenode)", which makes sense. These objects I'm looping through are Articles, and I want to display the 'Intro' in that paragraph.

I dunno how to retrieve it. I'm gonna keep reading the SDK, etc.

Peter Bailey

Tuesday 01 April 2003 8:51:31 am

I got it using

{attribute_view_gui attribute=$Child:item.object.data_map.intro}

:D