Problem cache for a variable

Author Message

Jean-François Sénéchal

Thursday 30 November 2006 3:29:21 am

Hello,

I have in my pagelayout.tpl include a template like this :

{include uri='design:actions.tpl' node_id=$node.node_id}

The code of actions.tpl :

<a href="/layout/set/print/content/view/full/{$node.node_id}"><img src="/design/plain_site/images/print.gif" alt="Imprimer" title="Imprimer"></a> 
<a href="page"><img src="/design/plain_site/images/mail.gif" alt="Nous contactez" title="Nous contactez"></a> 
<a href="/content/tipafriend/{$node.node_id}"><img src="/design/plain_site/images/sendto.gif" alt="Envoyez &agrave; un ami" title="Envoyez &agrave; un ami"></a> 
<a href="/content/pdf/{$node.node_id}"><img src="/design/plain_site/images/pdf.gif" alt="Version Pdf" title="Version Pdf"></a> 

The value of $node.node_id is always the same value on all the pages
(The value is, the first $node.node_id generated by the template)

And the value of {$node_id}, is too always the same value

How can I set off the cache for this ?

Or what's wrong ?

Thanks

L'informaticien est comme un petit canard:
il est calme en surface mais en dessous il brasse beaucoup d'eau pour
avancer ...!

Jacobo Quiles

Friday 01 December 2006 4:26:14 am

Hi, you can't access the $node variable that way from outside the content.
Try this:

{include uri='design:actions.tpl' node_id=$module_result.node_id}

Aside, you can also make sure that the included file is not inside a missconfigured cache-block tag.

Hope it helps.

Microblau SL
http://www.microblau.net

Jean-François Sénéchal

Friday 01 December 2006 9:12:31 am

Ok I was in a missconfigured cache-block tag.

Now it's ok

L'informaticien est comme un petit canard:
il est calme en surface mais en dessous il brasse beaucoup d'eau pour
avancer ...!

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 18 2025 11:33:06
Script start
Timing: Jan 18 2025 11:33:06
Module start 'layout'
Timing: Jan 18 2025 11:33:06
Module start 'content'
Timing: Jan 18 2025 11:33:07
Module end 'content'
Timing: Jan 18 2025 11:33:07
Script end

Main resources:

Total runtime0.5919 sec
Peak memory usage4,096.0000 KB
Database Queries57

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0088 587.9063152.6250
Module start 'layout' 0.00890.0056 740.531339.4453
Module start 'content' 0.01450.5759 779.9766535.9141
Module end 'content' 0.59030.0015 1,315.890612.1641
Script end 0.5919  1,328.0547 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00360.6083160.0002
Check MTime0.00140.2367160.0001
Mysql Total
Database connection0.00140.239710.0014
Mysqli_queries0.536790.6744570.0094
Looping result0.00050.0772550.0000
Template Total0.553093.420.2765
Template load0.00220.367320.0011
Template processing0.550893.060620.2754
Template load and register function0.00020.035010.0002
states
state_id_array0.00120.195110.0012
state_identifier_array0.00090.159020.0005
Override
Cache load0.00170.2917270.0001
Sytem overhead
Fetch class attribute can translate value0.00060.106420.0003
Fetch class attribute name0.00140.234040.0003
XML
Image XML parsing0.00080.133520.0004
class_abstraction
Instantiating content class attribute0.00000.001540.0000
General
dbfile0.00180.3073170.0001
String conversion0.00000.002040.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1node/view/full.tplfull/forum_topic.tplextension/sevenx/design/simple/override/templates/full/forum_topic.tplEdit templateOverride template
3content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
6content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
3content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
1content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
1content/datatype/view/ezxmltags/literal.tpl<No override>extension/community/design/standard/templates/content/datatype/view/ezxmltags/literal.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 16
 Number of unique templates used: 7

Time used to render debug report: 0.0001 secs