How to exchange parameters between several parts (blocks) on a page ? (persistent variables)

Author Message

Xavier Dutoit

Friday 08 April 2005 1:05:38 am

Hello,

I'd like to be able to set a param from the full view and being able to retrieve it from another part (eg the pagelayout).

I'm able to see some attributes set by ez (eg the id_section) , but can't imagine how to add a new attribute.

I've tried a set-block root, but I can't see it on the module_result, and I'm running out of ideas...

Any suggestion ?

Thanks in advance,

Xavier

http://www.sydesy.com

Paul Borgermans

Friday 08 April 2005 8:43:03 am

Xavier,

It should work: define a variable in the pagelayout and modify it with set-block global (root means in the current file like the view template only)

hth

-paul

eZ Publish, eZ Find, Solr expert consulting and training
http://twitter.com/paulborgermans

Xavier Dutoit

Friday 08 April 2005 9:41:28 am

Paul,

Stupid of me, thanks very much.

It still have a problem: it only works the first time after I clear the cache, not the other times.

My context:
I set-block global on a full template, and I read the result on the pagelayout.tpl

Any idea ?

Xavier

http://www.sydesy.com

Xavier Dutoit

Monday 11 April 2005 6:16:54 am

Hello,

I'm still stuck with the problem. On the template that should receive a param, adding a cache-block works:

{cache-block keys=array('param',$uri_string)}
({$param})
{/cache-block}

However, the part where I need to read the param has to be uncached.

Any idea ?

Xavier

http://www.sydesy.com

Kristian Hole

Thursday 14 April 2005 3:09:12 pm

Xavier,

If you want to disable the cache for a template, check this out:

http://www.ez.no/ez_publish/documentation/incoming/how_to_set_cache_expire_time_or_disable_cache_in_template

Kristian

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

Xavier Dutoit

Thursday 21 April 2005 9:35:56 am

Hi,

I think I found the way of sorting my problem (persistent variable):
http://www.ez.no/ez_publish/documentation/incoming/persistent_template_variable

However, it doesn't seem to work as expected/described:
http://www.ez.no/community/bugs/two_persistent_variable_problems_in_content_templates

X+

http://www.sydesy.com

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 20 2025 03:59:06
Script start
Timing: Jan 20 2025 03:59:06
Module start 'layout'
Timing: Jan 20 2025 03:59:06
Module start 'content'
Timing: Jan 20 2025 03:59:07
Module end 'content'
Timing: Jan 20 2025 03:59:07
Script end

Main resources:

Total runtime1.2918 sec
Peak memory usage4,096.0000 KB
Database Queries68

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0054 589.6484152.6875
Module start 'layout' 0.00540.0021 742.335939.5859
Module start 'content' 0.00751.2825 781.9219622.8281
Module end 'content' 1.29000.0017 1,404.750016.0469
Script end 1.2918  1,420.7969 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00330.2559160.0002
Check MTime0.00130.1028160.0001
Mysql Total
Database connection0.00070.051110.0007
Mysqli_queries1.224194.7612680.0180
Looping result0.00060.0467660.0000
Template Total1.261497.620.6307
Template load0.00200.153820.0010
Template processing1.259497.488820.6297
Template load and register function0.00010.006610.0001
states
state_id_array0.00160.124510.0016
state_identifier_array0.00110.086820.0006
Override
Cache load0.00170.1340490.0000
Sytem overhead
Fetch class attribute can translate value0.00060.045130.0002
Fetch class attribute name0.00080.062890.0001
XML
Image XML parsing0.00290.223330.0010
class_abstraction
Instantiating content class attribute0.00000.0014120.0000
General
dbfile0.00260.1975290.0001
String conversion0.00000.000640.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
6content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
6content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
10content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
4content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 28
 Number of unique templates used: 6

Time used to render debug report: 0.0002 secs