Forums / Setup & design / ezFlow: How to get node properties..!?

ezFlow: How to get node properties..!?

Author Message

Michael Fürst

Wednesday 06 August 2008 6:41:25 am

Hi there,

Short question:
Is there a way to access the node properties from a ezFlow Block? The only variable that is awailable is $block. $node or $module_result are unavailable in the block template.

Does anyone have an idea? I'd like to display the "name" attribut of the actual node in a block placed on this node / site.

Tanks a lot & bye,
Mike

Marvix Marx

Thursday 07 August 2008 12:08:59 am

I have the same problem ...
http://ez.no/developer/forum/developer/ezflow_bug_can_t_view_passed_vars_how_please

But try $#node ...

Bin LIU

Thursday 07 August 2008 2:26:15 pm

Hi,

You can override the frontpage.tpl
the line :


{attribute_view_gui attribute=$node.object.data_map.page}
 

By :


{attribute_view_gui attribute=$node.object.data_map.page node=$node view_parameters=$view_parameters [and all you want ... ...]}
 

Then you have the $node in zone.

=== Lagardère Active ===

Fetch random
http://projects.ez.no/la_fetch_random
LA Static Cache
http://projects.ez.no/lastaticcache
LA Bookmarks (jquery)
http://projects.ez.no/labookmark
LA Calendar (jquery)
http://projects.ez.no/lacalendar

My site ez
http://lingping.info

Michael Fürst

Wednesday 03 September 2008 5:25:33 am

Hi,

Thanks for this idea, but it seems not to work.
I've created a new override tpl for frontpage.tpl. Override works.

I used node as parameter in this frontpage.tpl:

<div class="content-view-full">
    <div class="class-frontpage">
	    <div class="attribute-page"
	    	{attribute_view_gui attribute=$node.object.data_map.page node=$node}
	    </div>
    </div>
</div>

And in my eZFlow Block on a "frontpage" i try to get the $node parameter:

{$node|attribute(show,1)}

But it seems that $node is null...
Do you have any other idea??

Thanks a lot & regards,
Michael

Sebastiaan van der Vliet

Wednesday 03 September 2008 5:32:13 am

Hi,

Did you try this one already?

In pagelayout.tpl, add:

{def $this_node=fetch('content','node', hash( 'node_id', $module_result.node_id))}
{set scope='global' $var='this_node'}

$this_node is then available in the block templates as $#this_node.

Certified eZ publish developer with over 9 years of eZ publish experience. Available for challenging eZ publish projects as a technical consultant, project manager, trouble shooter or strategic advisor.

Michael Fürst

Wednesday 03 September 2008 5:50:22 am

Hi,

I just found out that i need to pass $node also throug the zone layout:

<b>frontpage.tpl:</b>

{attribute_view_gui attribute=$node.object.data_map.page node=$node}

<b>2zoneslayout1.tpl: (your zone file)</b>

{block_view_gui block=$block node=$node}

<b>myezflowblock.tpl (Block Template where node ID is required)</b>

{$node.node_id} -> WORKS!

Thanks for your inputs!
Ciao,
Mike

eZ debug

Timing: Jan 18 2025 10:32:40
Script start
Timing: Jan 18 2025 10:32:40
Module start 'content'
Timing: Jan 18 2025 10:32:41
Module end 'content'
Timing: Jan 18 2025 10:32:41
Script end

Main resources:

Total runtime1.6239 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.0087 587.8125180.8281
Module start 'content' 0.00871.4434 768.6406674.4688
Module end 'content' 1.45200.1718 1,443.1094341.0859
Script end 1.6238  1,784.1953 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00470.2903210.0002
Check MTime0.00180.1131210.0001
Mysql Total
Database connection0.00160.099010.0016
Mysqli_queries1.533194.40952070.0074
Looping result0.00230.14362050.0000
Template Total1.589797.920.7948
Template load0.00200.124920.0010
Template processing1.587697.765420.7938
Template load and register function0.00010.006210.0001
states
state_id_array0.00070.042910.0007
state_identifier_array0.00170.107520.0009
Override
Cache load0.00180.1099560.0000
Sytem overhead
Fetch class attribute can translate value0.00190.114550.0004
Fetch class attribute name0.00160.099290.0002
XML
Image XML parsing0.00230.140150.0005
class_abstraction
Instantiating content class attribute0.00000.0011110.0000
General
dbfile0.00340.2085390.0001
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
5content/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
19content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
8content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
8content/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: 48
 Number of unique templates used: 7

Time used to render debug report: 0.0002 secs