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??!!

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 05:34:36
Script start
Timing: Jan 31 2025 05:34:36
Module start 'layout'
Timing: Jan 31 2025 05:34:36
Module start 'content'
Timing: Jan 31 2025 05:34:36
Module end 'content'
Timing: Jan 31 2025 05:34:36
Script end

Main resources:

Total runtime0.0152 sec
Peak memory usage2,048.0000 KB
Database Queries3

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0056 588.2656151.2266
Module start 'layout' 0.00560.0023 739.492236.6797
Module start 'content' 0.00790.0057 776.171990.1875
Module end 'content' 0.01360.0015 866.359433.9922
Script end 0.0151  900.3516 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.002415.5699140.0002
Check MTime0.00117.1632140.0001
Mysql Total
Database connection0.00085.381010.0008
Mysqli_queries0.002416.004830.0008
Looping result0.00000.072210.0000
Template Total0.00127.610.0012
Template load0.00095.842610.0009
Template processing0.00031.764910.0003
Override
Cache load0.00064.069910.0006
General
dbfile0.001610.747980.0002
String conversion0.00000.033040.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