Share » Forums » Extensions » eZ Flow » eZ Flow and Global Zone Layout

eZ Flow and Global Zone Layout

eZ Flow and Global Zone Layout

Friday 25 April 2008 3:17:44 am - 10 replies

Modified on Friday 25 April 2008 4:22:15 am by Santeri Lindgren

Author Message

Santeri Lindgren

Friday 25 April 2008 3:57:04 am

Ok, take that back.

we have it working now.

Problem 2)

We were missing this part from ezflow template:

          <!-- Extra content: START -->
          {if $current_node_id}
            {include uri='design:parts/extra_info.tpl'}
          {/if}
          <!-- Extra content: END -->

Which loads this piece of crucial code:

{def $global_layout_class = fetch( 'content', 'class', hash( 'class_id', 'global_layout' ) )
     $global_layout_object = $global_layout_class.object_list[0]}

This loads up the globalzonelayout.tpl from our template folder so all is well :)

Part 1)

We are now working on this, we don't have it working yet so we are working on this kind of a work around, if someone reads this later on can comment on how stupid this is;

Site structure:

Content
  - Site 1
    - Section 1.1
      - Folder 1.1.1
        - Article 1.1.1.1
  - Site 2
    - Section 2.1
      - Folder 2.1.1
        - Article 2.1.1.1
  - Global section (hidden folder)
    - Zone layouts (folder)
      - Site 1 (folder)
        - Global Zone Layout (Section 1) (global zone)
      - Site 2 (folder)

After this we map the global zone layout of section one into section one, and in template we make a check of (pseudocode):

if exists(/content/<current site>/<current section>/ ->LinkToGlobalLayout)
  $global_layout_object = <linkfromthesection>}
else
  $global_layout_object = <use_some_other_global_layout>}

This is now the idea, if it works were very happy, if not, were screwed :D

Mircea Sabau

Sunday 27 July 2008 1:46:58 am

Hi Santeri,

I have to setup a multisite with ezFlow... and I have no idea how...
Can you explain set by step ? For example, site1.domain.com and site2. domain.com...

Mircea Sabau

Wednesday 30 July 2008 2:48:15 am

Hi Santeri,

For problem 1: have you a concrete solution?
I need to use different global zones for different sections...

10x.

JF Ozange

Thursday 19 February 2009 1:55:54 am

I would like a solution to that problem too...
I used an Ezflow installation form EZP and i don't understand how i can choose which layout is user on a page/section.
According to the templates (pagelayout, extra_info...), the default layout "global zone" seems to be included on every page (It is genarated in the source code of the page) but not always visible... ??? Strange thing

Quynh Nguyen

Sunday 15 March 2009 10:42:29 pm

I think we can use the $current_node_id or find the parent node id to compare and show the desired global layout. Code below is modify in parts/extra_info.tpl

{switch match=$current_node_id}
{case match=60}
	{def $global_layout_object = $global_layout_class.object_list[0]}
		{attribute_view_gui attribute=$global_layout_object.data_map.page}
	{undef $global_layout_object}
{/case}
{case match=65}
	{def $global_layout_object = $global_layout_class.object_list[1]}
		{attribute_view_gui attribute=$global_layout_object.data_map.page}
	{undef $global_layout_object}
{/case}
{case match=70}
	{def $global_layout_object = $global_layout_class.object_list[2]}
		{attribute_view_gui attribute=$global_layout_object.data_map.page}
	{undef $global_layout_object}
{/case}
{/switch}

Is there anyway?

Victor Dujardin

Thursday 26 March 2009 3:34:20 am

Hello,

As everybody here, I am looking for a way to display specific blocks on every pages, depending on their sections.

But I really don't get which template I have to modify: <b>pagelayout.tpl</b> or <b>globalzonelayout.tpl</b>?
If anybody could explain the <b>difference between both and their specific use</b>, it would be greatly appreciated.

I think the "quick and dirty" way of doing the each-page-block-stuff is to do specific pagelayout.tpl overrides on each section. But I hope the global zone layouts provide a cleaner solution.

Anybody?

PS: And yes JF, this is a really good remark:

According to the templates (pagelayout, extra_info...), the default layout "global zone" seems to be included on every page (It is genarated in the source code of the page) but not always visible... ??? Strange thing

Sebastian Schoeller

Tuesday 02 March 2010 11:04:45 pm

Hi all,

has somebody developed a nice hack in order to use several global layouts. I would be interested very much.

Best wishes

Sebastian

Sebastian Schoeller

Wednesday 03 March 2010 2:28:25 am

ok, I found a solution for having *one* global_layout per section. I replaced extra_info.tpl with the following

{def $node = fetch( content, node, hash( 'node_id', $pagedata.node_id ) )}

{def $global_layout_class = fetch( content, tree,

             hash( parent_node_id, $node.parent_node_id,

             sort_by, array( published, false() ),

             attribute_filter, array( 'and', array( 'section', '=', $node.object.section_id ) ),

             class_filter_type, include,

             class_filter_array, array( 'global_layout' ) )  )}

<!-- ZONE CONTENT: START -->

<div class="border-box">

<div class="border-tl"><div class="border-tr"><div class="border-tc"></div></div></div>

<div class="border-ml"><div class="border-mr"><div class="border-mc">

<div class="border-content">

{attribute_view_gui attribute=$global_layout_class[0].data_map.page}

</div>

</div></div></div>

<div class="border-bl"><div class="border-br"><div class="border-bc"></div></div></div>

</div>

<!-- ZONE CONTENT: END -->

So first a content tree is fetched filtered by the section_id of the current node and global_layout class. Feedback is welcome

Best wishes

Sebastian

Romeo Antony

Monday 24 May 2010 12:10:28 am

Can u anyone help.

I trying to create a site in ezflow.I want to install 3 column layout for pagelayout.tpl in its main area.But by default, welcome page comes as a ezpublish forlder class .How can i change into my 3 column layout front page.i have created a 3column layout. the problem i think is some overriding is needed to make the welcome page as 3 column layout.Can anyone light me on this idea. Thanks in anticipation Romeo

Mutunga Mutua

Saturday 15 January 2011 3:49:49 am

Sebastian,

Thanks for your solutions. It works for me just fine for the multiple global zone layout. I would like to ask if there is a way i can divide the article layout into columns and perhaps add more blocks so that when someone is reading an article they can view other items such as related stories. This would also serve to make reading more enjoyable and friendly besides improving the general look and feel.

I have managed to use your code in my ezflow website www.area254.com

Thanks all

Mutunga Mutua

You must be logged in to post messages in this topic!

36 542 Users on board!

Forums menu