Ezflow bug, can`t view passed vars ?! How please!

Author Message

Marvix Marx

Thursday 31 July 2008 10:40:10 am

Hi,

Am using ezflow to develop a site, in the blocks can`t show the default templates vars such $site,$current_user ... why ?

So, I tried to pass via vie :

 {attribute_view_gui attribute=$article_sidebar_object.data_map.page $user=$current_user}

didn`t work also .. how please .. could be a bug ?

THX

Gabriel Finkelstein

Thursday 31 July 2008 11:02:10 am

I think those variables are not defined everywhere. Maybe they only exist in the pagelayout.
Use:

{def $current_user=fetch( 'user', 'current_user' )}

Or pass variables without the $ sign:

{attribute_view_gui attribute=$article_sidebar_object.data_map.page user=$current_user}

Marvix Marx

Thursday 31 July 2008 11:47:49 am

tested .. didn`t work, and those vars should be available in all templates.

André R.

Thursday 31 July 2008 12:08:51 pm

> tested .. didn`t work, and those vars should be available in all templates.

Nope, only in pagelayout and included templates, you need to use the fetch as showed earlier here.

eZ Online Editor 5: http://projects.ez.no/ezoe || eZJSCore (Ajax): http://projects.ez.no/ezjscore || eZ Publish EE http://ez.no/eZPublish/eZ-Publish-Enterprise-Subscription
@: http://twitter.com/andrerom

Marvix Marx

Saturday 02 August 2008 11:51:48 am

Oh I see ... thanks!

Marvix Marx

Wednesday 06 August 2008 2:15:15 pm

Maybe not a bug ,,, maybe I can`t figure it out ... mmaybe am ^!#$^#@

\templates\parts\extra.tpl

{def $current_userx=fetch( 'user', 'current_user' )}
{def $center_sidebar_class = fetch( 'content', 'class', hash( 'class_id', 'center_sidebar' ) )
      $center_sidebar_object = $center_sidebar_class.object_list[0]}
{attribute_view_gui attribute=$center_sidebar_object.data_map.page userx=$current_userx}

\override\templates\block\center_block_1.tpl

[{$userx|attribute(show)}]

Did`t work !

I can`t fetch $node from "center_block_1.tpl" ... as I know just in the pagelayout.tpl no more $node ..

Any idea ???

Marvix Marx

Thursday 07 August 2008 12:09:29 am

its work with $#node ... is this normal ?

André R.

Thursday 07 August 2008 12:33:33 am

Yes, cause the block template is in a different namespace then the node/view/full template where the variable is set, so by using # your accessing the global variable node.

eZ Online Editor 5: http://projects.ez.no/ezoe || eZJSCore (Ajax): http://projects.ez.no/ezjscore || eZ Publish EE http://ez.no/eZPublish/eZ-Publish-Enterprise-Subscription
@: http://twitter.com/andrerom

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 15:01:15
Script start
Timing: Jan 18 2025 15:01:15
Module start 'layout'
Timing: Jan 18 2025 15:01:15
Module start 'content'
Timing: Jan 18 2025 15:01:16
Module end 'content'
Timing: Jan 18 2025 15:01:16
Script end

Main resources:

Total runtime1.3191 sec
Peak memory usage4,096.0000 KB
Database Queries74

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0095 589.1797152.6406
Module start 'layout' 0.00950.0068 741.820339.4766
Module start 'content' 0.01621.3014 781.2969633.5781
Module end 'content' 1.31760.0014 1,414.875016.1250
Script end 1.3190  1,431.0000 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00390.2922160.0002
Check MTime0.00140.1032160.0001
Mysql Total
Database connection0.00120.087710.0012
Mysqli_queries1.248694.6564740.0169
Looping result0.00080.0582720.0000
Template Total1.275396.720.6376
Template load0.00210.159820.0011
Template processing1.273196.517220.6366
Template load and register function0.00030.019010.0003
states
state_id_array0.00120.090210.0012
state_identifier_array0.00170.130820.0009
Override
Cache load0.00180.1367380.0000
Sytem overhead
Fetch class attribute can translate value0.00100.073030.0003
Fetch class attribute name0.00130.1004100.0001
XML
Image XML parsing0.00120.094230.0004
class_abstraction
Instantiating content class attribute0.00000.0015110.0000
General
dbfile0.00220.1639230.0001
String conversion0.00000.001040.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
8content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
12content/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
3content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
1content/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: 31
 Number of unique templates used: 7

Time used to render debug report: 0.0002 secs