How to display eZ Flow blocks into a system template ?

Author Message

Sébastien Antoniotti

Friday 05 February 2010 2:04:50 am

Hi,
I would like to display some eZ Flow blocks into the rightcol of my user/login.tpl by example.
So is there any way to instantiate on fly and display (with block_view_gui) some eZ Flow blocks using the block name declared into block.ini ?

Thanks in advance !

eZ Publish Freelance
web : http://www.webaxis.fr

Bruce Morrison

Sunday 07 February 2010 8:23:05 pm

Hi Sébastien

I'm not sure you can display blocks here as they are quite specific to the layout datatype that's part of ezflow.

What you can do is add the following line to your user/login.tpl template

{ezpagedata_set( 'extra_menu', 'user_login' )}

This tells the pagelayout.tpl to show the right menu (adds the extrainfo class to the page div) generates the extrainfo-position & extrainfo divs and loads parts/user_login.tpl into the extra_info div

If the value set to extramenu is an array then a template for each item in the array will be included.

Hope this helps

Cheers
Bruce

My Blog: http://www.stuffandcontent.com/
Follow me on twitter: http://twitter.com/brucemorrison
Consolidated eZ Publish Feed : http://friendfeed.com/rooms/ez-publish

Sébastien Antoniotti

Monday 08 February 2010 2:06:47 am

Hi Bruce,

Thanks for your reply, I do not know this use of extra_menu.

Another solution I found is to create somewhere in the content tree an object of a class using the layout datatype, then put the node_id of this node into a ini file.
Finally I fetch this node, I loop other blocks of the layout attribute, and I display Those that interest me using node_view_gui...
That's not very clean but there is no many solutions I think !

eZ Publish Freelance
web : http://www.webaxis.fr

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 02:12:54
Script start
Timing: Jan 18 2025 02:12:54
Module start 'layout'
Timing: Jan 18 2025 02:12:54
Module start 'content'
Timing: Jan 18 2025 02:12:54
Module end 'content'
Timing: Jan 18 2025 02:12:54
Script end

Main resources:

Total runtime0.4659 sec
Peak memory usage4,096.0000 KB
Database Queries57

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0056 588.1406152.6406
Module start 'layout' 0.00560.0022 740.781339.4766
Module start 'content' 0.00780.4567 780.2578551.9844
Module end 'content' 0.46450.0014 1,332.242212.1250
Script end 0.4659  1,344.3672 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00300.6544160.0002
Check MTime0.00120.2616160.0001
Mysql Total
Database connection0.00080.176210.0008
Mysqli_queries0.413288.6721570.0072
Looping result0.00050.1171550.0000
Template Total0.434293.220.2171
Template load0.00200.420420.0010
Template processing0.432292.767320.2161
Template load and register function0.00030.053910.0003
states
state_id_array0.00100.218310.0010
state_identifier_array0.00160.342320.0008
Override
Cache load0.00170.3628260.0001
Sytem overhead
Fetch class attribute can translate value0.00060.118920.0003
Fetch class attribute name0.00150.317250.0003
XML
Image XML parsing0.00310.664420.0015
class_abstraction
Instantiating content class attribute0.00000.002660.0000
General
dbfile0.00300.6335220.0001
String conversion0.00000.001940.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
3content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
3content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
3content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
6content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
1content/datatype/view/ezxmltags/literal.tpl<No override>extension/community/design/standard/templates/content/datatype/view/ezxmltags/literal.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 18
 Number of unique templates used: 7

Time used to render debug report: 0.0002 secs