Forums / Extensions / How to display eZ Flow blocks into a system template ?

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