Forums / Setup & design / Topmenu in Website Interface

Topmenu in Website Interface

Author Message

Maarten Holland

Sunday 04 November 2007 2:39:54 am

Hi all,

I'm using ezPublish 3.10.0 with ezwebin 1.2.0.

I've created two siteaccess for different sites that share the same database. Is it possible to tell ezPublish to show items from a specific folder in it's top menu?

I've noticed the following line in /extension/ezwebin/design/ezwebin/templates/menu/flat_top.tpl:

{def $root_node=fetch( 'content', 'node', hash( 'node_id', $indexpage ) )

It appears to me as if ezPublish tries to use the IndexPage that's set in site.ini.append.php as the root for the top menu. That's exactly what I need, but this doesn't work properly. It seems as though the flat_top.tpl template isn't used at all: When I remove it's contents and clear all caches, the menu still shows up.

Any tips would be greatly appreciated.

Thanks.

Maarten

Vicente Olivan

Monday 05 November 2007 2:35:16 pm

Hi Maarten,
Checks RootNode, IndexPage, DefaultPage and PathPrefix parameters for your setup, in the siteaccesses.

See: http://ez.no/developer/forum/install_configuration/configuration_of_12_sites_with_one_admin

Good luck

Maarten Holland

Tuesday 13 November 2007 2:25:20 pm

Vicente,

Thank you very much for your reply. I forgot to 'track changes' so didn't notice someone replied until now.

Unfortunately, the problem still persists. I've checked the values of the settings you've mentioned and they all seem correct to me.

The PathPrefix/IndexPage work fine since the desired node shows up when accessing the 'root URL'.

The problem only appears in the topmenu, where ezPublish lists the items that are in it's root or 'home' folder, instead of the folder I've specified in 'IndexPage', even though 'flat_top.tpl' contains the ini parameter 'indexpage' that I've set to the right node.

I would really LOVE to solve this, so I hope you or anyone else can give me another hint about what I've done wrong.

Thank you for your time,

Maarten

Maarten Holland

Tuesday 13 November 2007 2:32:04 pm

BTW: I've just noticed something else:

When accessing the front page or one of my own content objects below, the topmenu is wrong.

But, when accessing a system URL like /user/register or /content/tipafriend the topmenu reflects the right content of my IndexPage/DefaultPage Node.

Perhaps someone knows what this means?

Vicente Olivan

Friday 16 November 2007 1:49:34 pm

Hi Maarten

Change yours settingns in each siteaccesses (menu.ini.append.php):

[Topmenu_content]
URL[]
URL[default]=content/view/full/2

by

[Topmenu_content]
URL[]
URL[default]=content/view/full/<your_main_node>

André R.

Saturday 17 November 2007 4:42:55 am

When accessing the front page or one of my own content objects below, the topmenu is wrong. 

But, when accessing a system URL like /user/register or /content/tipafriend the topmenu reflects the right content of my IndexPage/DefaultPage Node.

You need to specify the correct "RootNodeDepth" setting, it's the one used when you are browsing nodes.

Set it to 2 instead of 1, given that your site is structured like this:

root
|
-site1
|
-site2

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

Maarten Holland

Sunday 18 November 2007 2:53:59 am

Thank you very much for all your replies. I'm getting closer, but am not quite there. Here's my current setup:

 site.ini.append.php:

 [SiteSettings]
 IndexPage=/content/view/full/474
 DefaultPage=/content/view/full/474
 RootNodeDepth=2

 content.ini.append.php:
 [NodeSettings]
 RootNode=474

When I leave the line in flat_top.tpl untouched:

 

     {def $root_node=fetch( 'content', 'node', hash( 'node_id', $indexpage ) )
 

Then the LEFT menu is good, but the TOP menu shows the contents of node 2 instead of 474. However, when I visit a system URL it does show the contents of root 474.

When I change the line in flat_top.tpl to:

 

     {def $root_node=fetch( 'content', 'node', hash( 'node_id', ezini( 'NodeSettings', 'RootNode', 'content.ini' ) ) )
 

Which should do the same IMO, than the LEFT menu is empty but the TOP menu does show the right contents of node 474, regardless whether I visit one of my own content objects or a system URL.

I'm completely lost now. Hope you can help me out again!

Thanks for your time,

Maarten

André R.

Tuesday 20 November 2007 1:49:57 am

I have reported this as a bug: http://issues.ez.no/IssueView.php?Id=12004&activeItem=1
Just override the templates to your own will in the mean time, and feel free to comment on the issue if you want.

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

eZ debug

Timing: Jan 18 2025 21:04:04
Script start
Timing: Jan 18 2025 21:04:04
Module start 'content'
Timing: Jan 18 2025 21:04:04
Module end 'content'
Timing: Jan 18 2025 21:04:05
Script end

Main resources:

Total runtime0.1883 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.0086 587.7109180.8359
Module start 'content' 0.00860.0054 768.5469105.9922
Module end 'content' 0.01400.1742 874.5391534.7734
Script end 0.1882  1,409.3125 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00361.9012200.0002
Check MTime0.00140.7396200.0001
Mysql Total
Database connection0.00130.692010.0013
Mysqli_queries0.135671.97601410.0010
Looping result0.00150.80741390.0000
Template Total0.173792.310.1737
Template load0.00100.532010.0010
Template processing0.172791.717810.1727
Override
Cache load0.00060.339410.0006
Sytem overhead
Fetch class attribute can translate value0.00050.281910.0005
XML
Image XML parsing0.00030.138010.0003
General
dbfile0.00432.3013200.0002
String conversion0.00000.004230.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