Display values..

Author Message

enigmista enigmista

Tuesday 02 September 2003 2:42:20 am

Hi. I am evalutating ez3 and i think that it is very very powerful.However i have a little problem with undestanding the displaying of objects.Sorry for my english i give you an example.. I have a object "Comunicati" that have the following attributes: name, data_di_pubblicazione.I have a section "Comunicati" and a pagelayout_comunicati.tpl for display a complete list of comunicati. In this template with the code:

{let children=fetch('content',list,hash(parent_node_id,$node.node_id))}
<ul>
{section name=Child loop=$children}
<li>{node_view_gui view=line content_node=$Child:item} <span>( {$Child:item.body} )</span></li>
{/section}
</ul>
{/let}

i can see a list that contains a list of comunicati. If i want display data_di_pubblicazione for each comunicato? How i can do? There is a good doc for undestanding this? Tnx a lot

Bjørn Kaarstein

Tuesday 02 September 2003 2:47:56 am

The naming convention has been changed for ezP3.1.

Take a look here: http://ez.no/developer/ez_publish_3/documentation/customization/custom_design/override_templates

Regards Bjørn

enigmista enigmista

Tuesday 02 September 2003 2:56:05 am

Not useful this for me.. i have understand this

Bjørn Kaarstein

Tuesday 02 September 2003 3:48:51 am

Sorry, then I must have misunderstood you.

If you'd like to see what attributes is available for your item, you could try {$:item|attribute(show)}, or {$:item.data_map|attribute(show)}.

I suppose "data_di_pubblicazione" is the publication date of your article. I think you can access this directly with {$:item.object.published|datetime(custom, '%d.%m.%y - %H:%i:%s')} without having it as an own attribute to your class.

Hope this helps.

Regards Bjørn

enigmista enigmista

Tuesday 02 September 2003 5:36:54 am

>Sorry, then I must have misunderstood you.

No no it is my english...

>If you'd like to see what attributes is available for your item, you could try {$:item|attribute(show)}, or {$:item.data_map|attribute(show)}.

No i know they.I have diffuculties with print it in templates

> I suppose "data_di_pubblicazione" is the publication date of your article. I think you can access this directly with {$:item.object.published|datetime(custom, '%d.%m.%y - %H:%i:%s')} without having it as an own attribute to your class.
Oh very useful... but if i want modify date?

Thanks

Bjørn Kaarstein

Tuesday 02 September 2003 6:22:32 am

If you manually want to edit your date and time, you'll have to use your "data_di_pubblicazione" attribute.

I think you can display it something like this:

{$:item.data_map.data_di_pubblicazione.data_int|l10n(date)}

Here's some more on usage of date/datetime: http://ez.no/developer/ez_publish_3/documentation/development/libraries/ez_template/operators/miscellaneous

Regards Bjørn

enigmista enigmista

Tuesday 02 September 2003 6:46:30 am

If you manually want to edit your date and time, you'll have to use your "data_di_pubblicazione" attribute.

I think you can display it something like this:

{$:item.data_map.data_di_pubblicazione.data_int|l10n(date)}

Here's some more on usage of date/datetime: http://ez.no/developer/ez_publish_3/documentation/development/libraries/ez_template/operators/miscellaneous

Ok thanks for your useful help. Now it works... but if i want display data in comunicato.tpl?(not data_di_pubblicazione but the data when object was published)

This is my template
<h1>Comunicati</h1>
<h2>{attribute_view_gui attribute=$node.object.data_map.titolo}</h2>
<div class="comunicato-data"><span>Pubblicato il:</span> HERE I WANT DATE</div>
{attribute_view_gui attribute=$node.object.data_map.lead_in}
{attribute_view_gui attribute=$node.object.data_map.body}

Bjørn Kaarstein

Tuesday 02 September 2003 7:07:54 am

Replace "HERE I WANT DATE" with
{attribute_view_gui attribute=$node.object.published|datetime(custom, '%d.%m.%y - %H:%i:%s')}

might do the trick?

It might even be sufficient to use {$node.object.published|.....}

Good luck

Regards Bjørn

enigmista enigmista

Tuesday 02 September 2003 7:50:27 am

{$node.object.published|datetime(custom, '%d.%m.%y - %H:%i:%s')} works thanks a lot for all

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 01:30:00
Script start
Timing: Jan 31 2025 01:30:00
Module start 'layout'
Timing: Jan 31 2025 01:30:00
Module start 'content'
Timing: Jan 31 2025 01:30:00
Module end 'content'
Timing: Jan 31 2025 01:30:00
Script end

Main resources:

Total runtime0.0211 sec
Peak memory usage4,096.0000 KB
Database Queries3

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0054 588.0078151.1953
Module start 'layout' 0.00540.0035 739.2031220.6719
Module start 'content' 0.00890.0107 959.87501,005.6641
Module end 'content' 0.01960.0014 1,965.539137.9922
Script end 0.0210  2,003.5313 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.002712.6123140.0002
Check MTime0.00115.2294140.0001
Mysql Total
Database connection0.00125.852910.0012
Mysqli_queries0.002310.749630.0008
Looping result0.00000.062210.0000
Template Total0.00104.710.0010
Template load0.00083.640510.0008
Template processing0.00021.087510.0002
Override
Cache load0.00052.563210.0005
General
dbfile0.00021.069480.0000
String conversion0.00000.028340.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