Adding "Home" to the mainmenu, but not as Subfolder

Author Message

Philipp Simon

Tuesday 13 June 2006 2:13:19 am

Hi,

still new to ezPublish, just wanted to build a site of mine with ezPublish. Everything works fine, until now. Wanted to add the "Home" site to the mainmenu. So added a folder "Home", but this leads to following url: dummy.com/home. But it should stay dummy.com without subfolder. Also the "You are here" bar looks: "Home / Home".

Is there a way to add "Home" as mainmenu point (WITH highlight when active) without changing a template file? This should be done already cause it's really a basic feature.

Cheers

Phil

Łukasz Serwatka

Wednesday 14 June 2006 12:17:06 am

Philipp, create new object as Link class instance under root folder. Type "Home" and put "/" as URL. That will work with "double" and "flat" top menu.

Personal website -> http://serwatka.net
Blog (about eZ Publish) -> http://serwatka.net/blog

Philipp Simon

Wednesday 14 June 2006 2:01:27 am

Hi Lukasz,

seems like I am doing something wrong. I already tried this and I just tried it again. I also changed menu to "double top" or "top only", but my link doesn't appear in the menubar. (Just like articles) Do I have to configure something else? It's working for you with v3.8?

Thanks for your help.

Phil

Philipp Simon

Wednesday 14 June 2006 2:18:10 am

Just took a closer look at the INI files, and got it working:

Added:
TopIdentifierList[]=link

To menu.ini.append.php

Now I still have the problem with highlighting this button when on the "home" site. Currently nothing is highlighted. When doing it hardcoded it works, but is there a way to do it regular with ezPublish?

Sorry for this newbie questions.

Phil

Philipp Simon

Wednesday 14 June 2006 3:24:14 am

Just my 2 notes about my hack:

            {let selectedTmp=and( count( $module_result.path )|gt(1), eq( $module_result.path[1].node_id, $menu.node_id ) )}
            {if and( eq( $module_result.node_id, 2 ),  eq( $menu.node_id, 79 ) ) }
                {def $selected=true()}
            {else}
                {def $selected=$selectedTmp}
            {/if}

79 is the node id of the link object.

Phil

Philipp Simon

Monday 19 June 2006 4:09:21 am

Just another question. When having "Home" as link, is it possible to adjust ezPublish, so that I can add subitems to it? I already tweaked things when having "Home" as Folder, but in the left sub-menu I simply need nested link menu items.

My current issue is to build a "Home" left sub-menu with quicklinks into the different parts of the site.

Concering URL alias. Is it possible to set a link to node (id) in the tree and not using the alias? This would be much better, cause when alias changes, my link would simply get the alias from the node. (to bei clear: I still want to use alias in the link, but not hardcoded!)

Phil

Peter Szmulik

Wednesday 19 March 2008 7:18:40 am

Hi

I'm running eZ Publish 4.0 and have created a Link class instance as described above, pointing to "/". This works, however it opens the homepage in a new tab or window depending on browser and OS. In the admin GUI I find no way to change this behaviour; any tricks?

Best Regards
Peter

André R.

Wednesday 19 March 2008 8:51:05 am

You need to change / override the menu/flat_top.tpl template from ezwebin or ezflow extension, it adds target="_blank" to link classes.

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

Peter Szmulik

Thursday 20 March 2008 4:37:36 am

Andre'; many thanks!

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.

eZ debug

Timing: Jan 18 2025 19:27:07
Script start
Timing: Jan 18 2025 19:27:08
Module start 'layout'
Timing: Jan 18 2025 19:27:08
Module start 'content'
Timing: Jan 18 2025 19:27:08
Module end 'content'
Timing: Jan 18 2025 19:27:08
Script end

Main resources:

Total runtime0.7908 sec
Peak memory usage4,096.0000 KB
Database Queries79

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0086 592.1797152.6406
Module start 'layout' 0.00860.0039 744.820339.4766
Module start 'content' 0.01240.7768 784.2969681.0000
Module end 'content' 0.78930.0015 1,465.296920.1250
Script end 0.7908  1,485.4219 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00440.5554160.0003
Check MTime0.00260.3260160.0002
Mysql Total
Database connection0.00120.148610.0012
Mysqli_queries0.719791.0045790.0091
Looping result0.00070.0914770.0000
Template Total0.752795.220.3763
Template load0.00180.226720.0009
Template processing0.750994.948620.3754
Template load and register function0.00040.045910.0004
states
state_id_array0.00180.233210.0018
state_identifier_array0.00180.226020.0009
Override
Cache load0.00160.1978440.0000
Sytem overhead
Fetch class attribute can translate value0.00080.107140.0002
Fetch class attribute name0.00270.3471110.0002
XML
Image XML parsing0.00180.224840.0004
class_abstraction
Instantiating content class attribute0.00000.0030110.0000
General
dbfile0.00120.1461250.0000
String conversion0.00000.004840.0000
Note: percentages do not add up to 100% because some accumulators overlap

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
9content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
12content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
2content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
2content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
1content/datatype/view/ezxmltags/literal.tpl<No override>extension/community/design/standard/templates/content/datatype/view/ezxmltags/literal.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 28
 Number of unique templates used: 7

Time used to render debug report: 0.0001 secs