Forums / General / Pass parameters through attribute_view_gui [Solved]

Pass parameters through attribute_view_gui [Solved]

Author Message

Jean-Luc Nguyen

Friday 10 October 2008 3:08:12 am

Hello,

I need to pass a value to attribute_view_gui, like the image_class on ezimage.tpl, but my code is:

{attribute_view_gui prix_unite=2 attribute=$node.data_map.bouquet}

And then, on my template embed-bouquet.tpl, I cannot get the $prix_unite value. I really don't understand why.

{$prix_unite}
{default prix_unite=3}
<br />{$prix_unite}

It only displays the 3 value.

Thanks a lot!

http://www.acidre.com

Alain Sahli

Friday 10 October 2008 6:55:19 am

Hi,

Maybe its because you must first indicate the attribute...

    {attribute_view_gui attribute=$node.data_map.bouquet prix_unite=2}

http://www.wess.ch
eZ Publish Certified developer : http://auth.ez.no/certification/verify/272583

Yannick Komotir

Friday 10 October 2008 8:23:03 am

you can see here http://ez.no/doc/ez_publish/technical_manual/4_0/reference/template_functions/visualization/attribute_view_gui

<|- Software Engineer @ eZ Publish developpers -|>
@ http://twitter.com/yannixk

Nabil Alimi

Saturday 11 October 2008 4:36:17 pm

Jean Luc,

You're passing the parameter through attribute_view_gui but it seems that you want to use the variable in a template that is not the attribute override template.

Well actually i'm wondering... Which template call which ?

My blog : http://www.starnab.com/ezpublish / http://www.starnab.com/ / http://www.assiki-consulting.com
eZ Publish Freelance developper. Feel free to contact me +33 674 367 057
nabil at assiki d0t fr

Jean-Luc Nguyen

Monday 13 October 2008 2:34:06 am

Hello,

It seems like when activating the debug, it is a "different namespace" problem.. What is actually namespace? Is it the view?

http://www.acidre.com

Jean-Luc Nguyen

Tuesday 14 October 2008 5:57:47 am

I solved the problem by creating a global variable:

{set-block scope=global variable=prix_chaine_unite}2{/set-block}

So that in the "child" template, I can display the prix_chaine_unite:

{$#prix_chaine_unite}

The # means that the variable is a global one.

http://www.acidre.com

eZ debug

Timing: Jan 18 2025 10:20:21
Script start
Timing: Jan 18 2025 10:20:21
Module start 'content'
Timing: Jan 18 2025 10:20:23
Module end 'content'
Timing: Jan 18 2025 10:20:23
Script end

Main resources:

Total runtime1.5466 sec
Peak memory usage4,096.0000 KB
Database Queries207

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0074 588.9688180.8203
Module start 'content' 0.00741.3688 769.7891667.9063
Module end 'content' 1.37620.1703 1,437.6953341.0625
Script end 1.5465  1,778.7578 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00430.2807210.0002
Check MTime0.00160.1003210.0001
Mysql Total
Database connection0.00130.081710.0013
Mysqli_queries1.439893.09182070.0070
Looping result0.00220.14422050.0000
Template Total1.511797.720.7559
Template load0.00210.137320.0011
Template processing1.509697.604820.7548
Template load and register function0.00010.006710.0001
states
state_id_array0.00120.078210.0012
state_identifier_array0.00150.095920.0007
Override
Cache load0.00180.1191350.0001
Sytem overhead
Fetch class attribute can translate value0.00130.086550.0003
Fetch class attribute name0.00110.0706100.0001
XML
Image XML parsing0.00280.183050.0006
class_abstraction
Instantiating content class attribute0.00000.0016120.0000
General
dbfile0.01691.0895450.0004
String conversion0.00000.000430.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
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
5content/datatype/view/ezxmltags/literal.tpl<No override>extension/community/design/standard/templates/content/datatype/view/ezxmltags/literal.tplEdit templateOverride template
1pagelayout.tpl<No override>extension/sevenx/design/simple/templates/pagelayout.tplEdit templateOverride template
 Number of times templates used: 29
 Number of unique templates used: 6

Time used to render debug report: 0.0002 secs