Forums / Setup & design / Ez Publish 4.3 Design Configuration

Ez Publish 4.3 Design Configuration

Author Message

Eric Handler

Wednesday 01 September 2010 6:47:27 am

I am working on setting up a site using Ez Publish 4.3 with ezwebin. While doing this I am trying to create a leftmenu on the public side of the site. I was able to create and get the side menu running the way I would like on all the sub pages of the site, but the top level site, which is part of the class "frontpage" displays the sidemenu but doesn't populate the content as I would like. In my siteaccess that I created by copying ezwebin to a new location, I modified frontpage.tpl at line 1-3 from:

 {set scope=global persistent_variable=hash('left_menu', false(),
                                           'extra_menu', false(),
                                           'show_path', false())}

to

 {set scope=global persistent_variable=hash('left_menu', true(),
                                           'extra_menu', false(),
                                           'show_path', false())}

This is what made the side menu display, but I can't find in my searching of the internet what to add to frontpage.tpl to populate the menu with the names of the subcontent below it. Also, I added the appropriate [LeftIdentifierList] entries for my content classes to [MenuContentSettings] in menu.ini.append.php

What do I need to do to frontpage.tpl to make this work?

André R.

Wednesday 01 September 2010 9:23:00 am

your better of using a different class, for instance folder, frontpage is meant to cover the whole width, lots of css and code that you will have to fight.

Use advance -> swap node from context menu (the one on icons) in admin to change object of root node to something else.

As for getting things to show up in left menu, well, the children are shown in top menu I guess?
So to customize something for left menu, use your own left menu by setting a string (name of template within menu folder without ".tpl" suffix) on 'left_menu' instead of "true()".

for templates/menu/frontpage_left_menu.tpl:

{set scope=global persistent_variable=hash('left_menu', 'frontpage_left_menu',

eZ Online Editor 5: http://projects.ez.no/ezoe || eZJSCore (Ajax): http://projects.ez.no/ezjscore || eZ Publish EE http://ez.no/eZPublish/eZ-Publish-Enterprise-Subscription
@: http://twitter.com/andrerom

Eric Handler

Wednesday 01 September 2010 1:08:08 pm

I'm an Ez Publish newbie, so most of my progress has been trial and error based on all the documentation that says copy ezwebin and modify that.

I am not sure I follow your instructions. I swapped root to make it a folder rather than a front page. At this point I don't quite get what you are suggesting so I have tried to explain what I am trying to do

For Home I want to have the left menu duplicate the "Products", "About Us", "Careers" links that appear in the top menu as they are the three nodes (Class=Frontpage) inside the root folder. However, when I navigate to "About Us" I would like to have it show the sub pages of "About Us" which are articles about each employee on the side menu. Does this clarify what I am attempting to do?

Additionally, creating the new site has made me realize that I am having a hard time finding documentation about creating and modifying templates, any suggestions on where to find some helpful guides on creating custom classes and templates to define the appearance of those new classes?

Anaya P

Friday 10 September 2010 8:15:34 am

hopefully I have understood you right. You need to change page_leftmneu.tpl. Try below code and if this is what you want, then create your custom extension and override page_leftmenu.tpl(with below content) in there.

<code>

<div id="sidemenu-position">
<div id="sidemenu">
{if $module_result.content_info.class_identifier|eq('frontpage')}

{if is_array( $pagedata.left_menu )}
{foreach $pagedata.left_menu as $left_menu}
{include uri=concat('design:menu/', $left_menu, '.tpl')}
{delimiter}
<div class="hr"></div>
{/delimiter}
{/foreach}
{else}
{include uri=concat('design:menu/', $pagedata.left_menu, '.tpl')}
{/if}

{else}

{def $sub_menu=treemenu($module_result.path, $module_result.node_id,
array('standard_page','folder','contact_form','sub_page','link', 'frontpage', 'global_layout'), 1, 3) }
<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">
{if eq( $module_result.node_id, 2 ) }
{let $tmp_root_node=fetch( content, node, hash( node_id, 2 ) )}
<h4>{$tmp_root_node.name}</h4>
{/let}
{else}
<h4>{$module_result.path[1].text}</h4>
{/if}
<ul class="menu-list">
{def $last=0}
{foreach $sub_menu as $s_menu}
{if and($last|ne(0), $last.level|gt($s_menu.level))}{* this if second level is open *}
</ul>
</li>
{/if}
<li> {if and($last|ne(0), $last.level|lt($s_menu.level))}{* this if there is no second level *}
<ul>
<li>{/if}<a {if $s_menu.is_selected} class="current"{/if} href={$s_menu.url_alias|ezurl}>{$s_menu.text}</a></li>
{set last=$s_menu}
{/foreach}
</ul>
{undef $last}
{undef $sub_menu}
</div>
</div>
</div>
<div class="border-bl">
<div class="border-br">
<div class="border-bc"></div>
</div>
</div>
</div>
{/if}
</div></div>

</code>

As you will notice in above code, there is an array of class name defined, so if you want any of the page to appear in the left column, you need to add class name for that page in that array, for your reference below is the code -

<code>

{def $sub_menu=treemenu($module_result.path, $module_result.node_id,
array('standard_page','folder','contact_form','sub_page','link', 'frontpage', 'global_layout'), 1, 3) }

</code>

Hope this helps!

eZ debug

Timing: Jan 30 2025 01:00:15
Script start
Timing: Jan 30 2025 01:00:15
Module start 'content'
Timing: Jan 30 2025 01:00:15
Module end 'content'
Timing: Jan 30 2025 01:00:15
Script end

Main resources:

Total runtime0.1480 sec
Peak memory usage2,048.0000 KB
Database Queries141

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0123 588.0313180.8281
Module start 'content' 0.01230.0078 768.8594102.0078
Module end 'content' 0.02010.1278 870.8672531.3281
Script end 0.1479  1,402.1953 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00422.8654200.0002
Check MTime0.00150.9835200.0001
Mysql Total
Database connection0.00241.618610.0024
Mysqli_queries0.097465.79131410.0007
Looping result0.00130.84801390.0000
Template Total0.127386.110.1273
Template load0.00090.597310.0009
Template processing0.126585.457110.1265
Override
Cache load0.00060.413010.0006
Sytem overhead
Fetch class attribute can translate value0.00060.401510.0006
XML
Image XML parsing0.00020.146610.0002
General
dbfile0.00785.2774200.0004
String conversion0.00000.004730.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
1pagelayout.tpl<No override>extension/sevenx/design/simple/templates/pagelayout.tplEdit templateOverride template
 Number of times templates used: 1
 Number of unique templates used: 1

Time used to render debug report: 0.0001 secs