Forums / Setup & design / Display values..

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

eZ debug

Timing: Jan 18 2025 11:13:35
Script start
Timing: Jan 18 2025 11:13:35
Module start 'content'
Timing: Jan 18 2025 11:13:35
Module end 'content'
Timing: Jan 18 2025 11:13:35
Script end

Main resources:

Total runtime0.1529 sec
Peak memory usage2,048.0000 KB
Database Queries141

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0052 589.0313180.8516
Module start 'content' 0.00520.0045 769.8828101.7266
Module end 'content' 0.00970.1430 871.6094531.0000
Script end 0.1528  1,402.6094 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00322.0693200.0002
Check MTime0.00130.8592200.0001
Mysql Total
Database connection0.00070.460610.0007
Mysqli_queries0.107070.00311410.0008
Looping result0.00130.83491390.0000
Template Total0.142793.410.1427
Template load0.00060.421910.0006
Template processing0.142192.952910.1421
Override
Cache load0.00050.306210.0005
Sytem overhead
Fetch class attribute can translate value0.00171.099110.0017
XML
Image XML parsing0.00040.276710.0004
General
dbfile0.00452.9324200.0002
String conversion0.00000.003930.0000
Note: percentages do not add up to 100% because some accumulators overlap

CSS/JS files loaded with "ezjscPacker" during request:

CacheTypePacklevelSourceFiles
CSS0extension/community/design/community/stylesheets/ext/jquery.autocomplete.css
extension/community_design/design/suncana/stylesheets/scrollbars.css
extension/community_design/design/suncana/stylesheets/tabs.css
extension/community_design/design/suncana/stylesheets/roadmap.css
extension/community_design/design/suncana/stylesheets/content.css
extension/community_design/design/suncana/stylesheets/star-rating.css
extension/community_design/design/suncana/stylesheets/syntax_and_custom_tags.css
extension/community_design/design/suncana/stylesheets/buttons.css
extension/community_design/design/suncana/stylesheets/tweetbox.css
extension/community_design/design/suncana/stylesheets/jquery.fancybox-1.3.4.css
extension/bcsmoothgallery/design/standard/stylesheets/magnific-popup.css
extension/sevenx/design/simple/stylesheets/star_rating.css
extension/sevenx/design/simple/stylesheets/libs/fontawesome/css/all.min.css
extension/sevenx/design/simple/stylesheets/main.v02.css
extension/sevenx/design/simple/stylesheets/main.v02.res.css
JS0extension/ezjscore/design/standard/lib/yui/3.17.2/build/yui/yui-min.js
extension/ezjscore/design/standard/javascript/jquery-3.7.0.min.js
extension/community_design/design/suncana/javascript/jquery.ui.core.min.js
extension/community_design/design/suncana/javascript/jquery.ui.widget.min.js
extension/community_design/design/suncana/javascript/jquery.easing.1.3.js
extension/community_design/design/suncana/javascript/jquery.ui.tabs.js
extension/community_design/design/suncana/javascript/jquery.hoverIntent.min.js
extension/community_design/design/suncana/javascript/jquery.popmenu.js
extension/community_design/design/suncana/javascript/jScrollPane.js
extension/community_design/design/suncana/javascript/jquery.mousewheel.js
extension/community_design/design/suncana/javascript/jquery.cycle.all.js
extension/sevenx/design/simple/javascript/jquery.scrollTo.js
extension/community_design/design/suncana/javascript/jquery.cookie.js
extension/community_design/design/suncana/javascript/ezstarrating_jquery.js
extension/community_design/design/suncana/javascript/jquery.initboxes.js
extension/community_design/design/suncana/javascript/app.js
extension/community_design/design/suncana/javascript/twitterwidget.js
extension/community_design/design/suncana/javascript/community.js
extension/community_design/design/suncana/javascript/roadmap.js
extension/community_design/design/suncana/javascript/ez.js
extension/community_design/design/suncana/javascript/ezshareevents.js
extension/sevenx/design/simple/javascript/main.js

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1pagelayout.tpl<No override>extension/sevenx/design/simple/templates/pagelayout.tplEdit templateOverride template
 Number of times templates used: 1
 Number of unique templates used: 1

Time used to render debug report: 0.0002 secs