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

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

eZ debug

Timing: Jan 20 2025 03:58:32
Script start
Timing: Jan 20 2025 03:58:32
Module start 'content'
Timing: Jan 20 2025 03:58:32
Module end 'content'
Timing: Jan 20 2025 03:58:32
Script end

Main resources:

Total runtime0.1735 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.0068 589.5234180.7813
Module start 'content' 0.00680.0087 770.3047102.0547
Module end 'content' 0.01560.1579 872.3594530.4219
Script end 0.1735  1,402.7813 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00804.6075200.0004
Check MTime0.00543.1215200.0003
Mysql Total
Database connection0.00050.309410.0005
Mysqli_queries0.111164.03391410.0008
Looping result0.00110.60821390.0000
Template Total0.157590.810.1575
Template load0.00090.532410.0009
Template processing0.156690.231210.1566
Override
Cache load0.00070.380310.0007
Sytem overhead
Fetch class attribute can translate value0.00090.511210.0009
XML
Image XML parsing0.00100.554910.0010
General
dbfile0.01679.6343200.0008
String conversion0.00000.004130.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.0001 secs