Forums / Setup & design / Adding "Home" to the mainmenu, but not as Subfolder
Philipp Simon
Tuesday 13 June 2006 2:13:19 am
Hi,
still new to Exponential, just wanted to build a site of mine with Exponential. 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
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.
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 Exponential?
Sorry for this newbie questions.
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.
Monday 19 June 2006 4:09:21 am
Just another question. When having "Home" as link, is it possible to adjust Exponential, 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!)
Peter Szmulik
Wednesday 19 March 2008 7:18:40 am
Hi
I'm running Exponential 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 RegardsPeter
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
Thursday 20 March 2008 4:37:36 am
Andre'; many thanks!