Forums / Discussions / ezflow : adding new zones to existing frontpage objects

ezflow : adding new zones to existing frontpage objects

Author Message

Alex Vinogradov

Monday 29 November 2010 5:49:55 am

When new zones are added to a layout in zone.ini, existing frontpage objects with that layout don't look like containing those zones. (no tabs in admin interface etc ) Are there any ways to see the change applied ? (apart from hacking ezpagetype.php)

Romeo Antony

Monday 29 November 2010 11:22:22 pm

Hi Alex,

"When new zones are added to a layout in zone.ini,"

Please post your custom zone config code that present in the zone.ini.

"existing frontpage objects with that layout don't look like containing those zones"

may be it is bez you didn't applied the css styling in the right way for newly created zones.

Post the comeplete zone block code.

Second thing check the block array retrived in zones that are in right order as you expect.

Reagrds

Romeo

Alex Vinogradov

Tuesday 30 November 2010 2:12:58 am

thanks for replying, Romeo. I meant when you have something like this in zone.ini :

[my_custom_layout]
Zones[]=right_col

when a frontpage is created and 'my_custom_layout' is applied to it, it will have the 'right_col' zone.

If afterwords I add an entry to ini to have

[my_custom_layout]
Zones[]=right_col
Zones[]=left_col

then the old frontpage object won't contain 'left_col' in its zones array : ($frontpage.data_map.page.content.zones) You cannot add blocks to it cause in admin interface there's no tab corresponding to 'left_col' zone. i don't see what css has to do with it.. hope i was clear.

Romeo Antony

Tuesday 30 November 2010 3:29:20 am

Hi Alex, from your reply I understand like, after adding zones to a custom zone template you are unable to see it.

for instance in zone.ini , it should be like this . I am creating a custom zone called 4ZonesLayout4.

[4ZonesLayout4]
ZoneTypeName=4 zones (layout 4)
Zones[]=lft
Zones[]=midle_lft
Zones[]=midle_rht
Zones[]=rht
ZoneName[lft]=Left zone
ZoneName[midle_lft]=Middle Left zone
ZoneName[midle_rht]=middle Right zone
ZoneName[rht]=Right zone
ZoneThumbnail=4zones_layout4.gif
Template=4zoneslayout4.tpl
AvailableForClasses[]=frontpage

above zone template contain 4 zones, preview like

4 columns ,

4zoneslayout4.tpl will be like follwoing

<div class="zone-layout-{$zone_layout|downcase()}">
<div class="float-break content-columns">
<div class="leftcol-position">
<div class="leftcol">
<!-- ZONE CONTENT: START -->
<div class="border-box">
<div class="border-ml"><div class="border-mr"><div class="border-mc">
<div class="border-content">
{if and( is_set( $zones[0].blocks ), $zones[0].blocks|count() )}
{foreach $zones[0].blocks as $block}
{if or( $block.valid_nodes|count(),
and( is_set( $block.custom_attributes), $block.custom_attributes|count() ),
and( eq( ezini( $block.type, 'ManualAddingOfItems', 'block.ini' ), 'disabled' ), ezini_hasvariable( $block.type, 'FetchClass', 'block.ini' )|not ) )}
<div id="address-{$block.zone_id}-{$block.id}">
{block_view_gui block=$block}
</div>
{else}
{skip}
{/if}

{/foreach}
{/if}
</div>
</div></div></div>
<div class="border-bl"><div class="border-br"><div class="border-bc"></div></div></div>
</div>
<!-- ZONE CONTENT: END -->
</div>
</div>
<div class="mainleftcol-position">
<div class="mainleftcol">
<!-- ZONE CONTENT: START -->
<div class="border-box">
<div class="border-ml"><div class="border-mr"><div class="border-mc">
<div class="border-content">
{if and( is_set( $zones[1].blocks ), $zones[1].blocks|count() )}
{foreach $zones[1].blocks as $block}
{if or( $block.valid_nodes|count(),
and( is_set( $block.custom_attributes), $block.custom_attributes|count() ),
and( eq( ezini( $block.type, 'ManualAddingOfItems', 'block.ini' ), 'disabled' ), ezini_hasvariable( $block.type, 'FetchClass', 'block.ini' )|not ) )}
<div id="address-{$block.zone_id}-{$block.id}">
{block_view_gui block=$block}
</div>
{else}
{skip}
{/if}

{/foreach}
{/if}
</div>
</div></div></div>
<div class="border-bl"><div class="border-br"><div class="border-bc"></div></div></div>
</div>
<!-- ZONE CONTENT: END -->
<!-- COLUMNS TWO: START -->
<!-- COLUMNS TWO: END -->
</div>
</div>
<div class="mainrightcol-position">
<div class="mainrightcol">
<!-- ZONE CONTENT: START -->
<div class="border-box">
<div class="border-ml"><div class="border-mr"><div class="border-mc">
<div class="border-content">
{if and( is_set( $zones[2].blocks ), $zones[2].blocks|count() )}
{foreach $zones[2].blocks as $block}
{if or( $block.valid_nodes|count(),
and( is_set( $block.custom_attributes), $block.custom_attributes|count() ),
and( eq( ezini( $block.type, 'ManualAddingOfItems', 'block.ini' ), 'disabled' ), ezini_hasvariable( $block.type, 'FetchClass', 'block.ini' )|not ) )}
<div id="address-{$block.zone_id}-{$block.id}">
{block_view_gui block=$block}
</div>
{else}
{skip}
{/if}

{/foreach}
{/if}
</div>
</div></div></div>
<div class="border-bl"><div class="border-br"><div class="border-bc"></div></div></div>
</div>
<!-- ZONE CONTENT: END -->
</div>
</div>
<div class="rightcol-position">
<div class="rightcol">
<!-- ZONE CONTENT: START -->
<div class="border-box">
<div class="border-ml"><div class="border-mr"><div class="border-mc">
<div class="border-content">
{if and( is_set( $zones[3].blocks ), $zones[3].blocks|count() )}
{foreach $zones[3].blocks as $block}
{if or( $block.valid_nodes|count(),
and( is_set( $block.custom_attributes), $block.custom_attributes|count() ),
and( eq( ezini( $block.type, 'ManualAddingOfItems', 'block.ini' ), 'disabled' ), ezini_hasvariable( $block.type, 'FetchClass', 'block.ini' )|not ) )}
<div id="address-{$block.zone_id}-{$block.id}">
{block_view_gui block=$block}
</div>
{else}
{skip}
{/if}

{/foreach}
{/if}
</div>
</div></div></div>
<div class="border-bl"><div class="border-br"><div class="border-bc"></div></div></div>
</div>
<!-- ZONE CONTENT: END -->
</div>
</div>
</div>
</div>

do css styling for div classes like zone-layout-4zonelayout4,leftcol-position,leftcol, for every div classes and check through firebug . First you should create a frame for this zonetemplate using css then , style it later on.

Reagrds

Romeo.

Alex Vinogradov

Tuesday 30 November 2010 5:18:49 am

Yeah that's right but say in a future you need to add another zone to this frontpage, so you add these lines to zone.ini (on [4ZonesLayout4] ):

Zones[]=extra_zone
ZoneName[extra_zone]=Extra zone

Then you'll be unable to edit this zone for that frontpage and in 4zoneslayout4.tpl $zones[4] will be undefined. Only if you create new frontpage object with "4ZonesLayout4" layout you'll see that new 'Extra zone'. That was my problem. i could resolve that by making slight changes to ezpagetype.php, but that's not probably the best thing to do. Thank you again.

Romeo Antony

Tuesday 30 November 2010 7:40:06 am

yes .you are correct the same thing happend to me also. In such cases for me the only solution is to remove the frontpage and re publish the frontpage again with the new zones. Hope someone with good experience in ezflow can help you.

eZ debug

Timing: Jan 18 2025 02:49:59
Script start
Timing: Jan 18 2025 02:49:59
Module start 'content'
Timing: Jan 18 2025 02:50:00
Module end 'content'
Timing: Jan 18 2025 02:50:00
Script end

Main resources:

Total runtime0.6074 sec
Peak memory usage4,096.0000 KB
Database Queries203

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0086 587.9531180.8203
Module start 'content' 0.00860.4717 768.7734577.0313
Module end 'content' 0.48030.1270 1,345.8047345.3516
Script end 0.6073  1,691.1563 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00440.7284210.0002
Check MTime0.00160.2642210.0001
Mysql Total
Database connection0.00090.146510.0009
Mysqli_queries0.479178.88522030.0024
Looping result0.00200.32182010.0000
Template Total0.578095.220.2890
Template load0.00190.317020.0010
Template processing0.576194.846520.2880
Template load and register function0.00020.035910.0002
states
state_id_array0.00080.128710.0008
state_identifier_array0.00080.138620.0004
Override
Cache load0.00200.33581700.0000
Sytem overhead
Fetch class attribute can translate value0.00120.190630.0004
Fetch class attribute name0.00130.221170.0002
XML
Image XML parsing0.00070.119130.0002
class_abstraction
Instantiating content class attribute0.00000.004690.0000
General
dbfile0.00240.4021270.0001
String conversion0.00000.001330.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
6content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
11content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
3content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
5content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
1pagelayout.tpl<No override>extension/sevenx/design/simple/templates/pagelayout.tplEdit templateOverride template
 Number of times templates used: 27
 Number of unique templates used: 6

Time used to render debug report: 0.0002 secs