Forums / Setup & design / what is the difference between these codes??

what is the difference between these codes??

Author Message

eve f

Tuesday 21 December 2004 6:17:33 pm

hi all,

i need someone to tell me what is the difference between these two codes. can i combine tis 2 codes together??

<div class="content-view-line">
<div class="class-article">

<h2><a href={$node.url_alias|ezurl}>{$node.object.data_map.title.content|wash}</a></h2>

{section show=$node.object.data_map.image.content}
<div class="attribute-image">
{attribute_view_gui alignment=right image_class=articlethumbnail attribute=$node.object.data_map.image.content.data_map.image}
</div>
{/section}

{section show=$node.object.data_map.intro.content.is_empty|not}
<div class="attribute-short">
{attribute_view_gui attribute=$node.object.data_map.intro}
</div>
{/section}

{section show=$node.object.data_map.body.content.is_empty|not}
<div class="attribute-link">
<p><a href={$node.url_alias|ezurl} >{"Read more..."|i18n("design/base")}</a></p>
</div>
{/section}

</div>
</div>

-------------------------------------------------------------------------{section name=Child loop=fetch(content,list,hash(parent_node_id,69,limit,$page_limit,offset,$view_parameters.offset,sort_by,$node.sort_array))}

{node_view_gui view=line content_node=$Child:item}

{/section}

thanks you

Kristian Hole

Wednesday 22 December 2004 12:20:00 am

The short answer is:
The first code takes the attributes title, image, intro and body (from the data_map) of a node, and displays them with attribute_view_gui

The second code fetches a number of nodes, and displays them with node_view_gui in lineview.

See:
http://ez.no/ez_publish/documentation/development/libraries/ez_template/functions/function_list

To combine these you probably want to create an override for the lineview of your class.

This is described in the "Building an eZ publish site" tutorial:
http://ez.no/ez_publish/documentation/building_an_ez_publish_site/the_news_page/overview_of_the_latest_news

Kristian

http://ez.no/ez_publish/documenta...tricks/show_which_templates_are_used
http://ez.no/doc/ez_publish/techn...te_operators/miscellaneous/attribute

eve f

Wednesday 22 December 2004 6:12:41 pm

i try to use the 1st codes, but nothing is being display.

i use the 2nd codes, the display is ok, but the "read more" link does not work.

anyone can help me??!!