Forums / Extensions / eZ Flow / eZ Flow and Global Zone Layout

eZ Flow and Global Zone Layout

Author Message

Santeri Lindgren

Friday 25 April 2008 3:17:44 am

Hello, were building a new site and are having some problems with the eZ Flow Global Layout Zones.

More specifically we have two problems;

1) We have multisite installation so that we have separate siteaccess for each site as instructed, this works just fine and we have no problem in there.

We have our own design that we have done and are using override.ini.append.php under each siteaccess (plan to move it under design/settings/override.ini.append.php) to specify our own block items that we have created.

Our content structure is as follows:

Content
  - Site 1 (frontpage)
    - Sub item 1 (frontpage)
      - Sub folder 1 (folder)
        - Article 1 (article)
        - Article 2 (article)
      - Sub folder 2 (folder)
      - Sub folder 3 (folder)
    - Sub item 2 (frontpage)
      - Sub folder 2 (folder)
        - Article 4 (article)
  - Site 2 (frontpage)

What we have now working is that we have defined our own zone layout (3 column type) and are able to select and use it when we have frontpage type page and it's loading it and working properly.

What we now want is to have multiple global zone's so that when one browses under sub folder 1 and selects an article 1, we use global zone 1 and display a number of block items and the content of article 1 in the center.

Then when the user goes to sub folder 2 and chooses to view article 4, we want to display a different global zone with different block elements.

This would give us the ability to have a main page and each sub page to have separate block configuration and then have a global layout under each sub section to be separate depending on where the user is currently in the content tree.

How to accomplish this is still a bit hazy and we would love to have some input.

Problem 2)

This is currently our main problem, as i stated previously we have our own design that we have placed under extension/ezflow/design/nitro/ folder, we first tried to have the design under design/ folder but we couldn't get the zones to load so now we placed it under ezflow extension and it's working nicely.

In siteaccess/site1/site.ini.append.php we have:

[DesignSettings]
SiteDesign=nitro
AdditionalSiteDesignList[]=base
AdditionalSiteDesignList[]=standard

And it loads up nicely, the only problem we have is that we are not able to load any kind of global zone layout template. The 3zonelayout_nitro.tpl we have configured is working just fine on the frontpage type of pages but when you go under subsections it doesn't load up the globalzone layout.

We've wiggled with the settings as much as possible but are unsure on why this might happen, when we revert the site.ini.append.php to a state of:

[DesignSettings]
SiteDesign=ezflow
AdditionalSiteDesignList[]=ezwebin
AdditionalSiteDesignList[]=base
AdditionalSiteDesignList[]=standard

It does load up the globalzonelayout nicely so were doing something wrong in our template or settings but we are unsure what.

Any kind of help would be appreciated on either of the problems we face now.

- Santeri Lindgren

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