Posts: 4
Threads: 3
Joined: Jan 2012
Hi,
Let`s say I have 8 pages. I would like to link all this pages in two separately menus. I mean 4 pages goes to one menu (above content) and last 4 goes to the other menu (below content). I tried to achieve something like this in I18N Navigation plugin but I cant figure it how to make such a thing. Is it possible to make something like this?
Best regards & sorry for bad english
Egahen
Posts: 2,094
Threads: 54
Joined: Jan 2011
egahen Wrote:Let`s say I have 8 pages. I would like to link all this pages in two separately menus. I mean 4 pages goes to one menu (above content) and last 4 goes to the other menu (below content). I tried to achieve something like this in I18N Navigation plugin but I cant figure it how to make such a thing. Is it possible to make something like this?
You could do this by putting the pages under two dummy parent pages (make sure to set 'add to menu' for them), e.g.:
Code:
dummy-top
index
page1
page2
page3
dummy-bottom
page4
page5
page6
page7
Then you can display the menus like this:
Code:
<?php
$bc = return_i18n_breadcrumbs(return_page_slug());
// top menu
get_i18n_navigation($bc[0]['url']=='dummy-top'?return_page_slug():'dummy-top',1,99);
...
// bottom menu
get_i18n_navigation($bc[0]['url']=='dummy-bottom'?return_page_slug():'dummy-bottom',1,99);
?>
Posts: 206
Threads: 7
Joined: Mar 2013
(2012-01-27, 19:18:46)mvlcek Wrote: egahen Wrote:Let`s say I have 8 pages. I would like to link all this pages in two separately menus. I mean 4 pages goes to one menu (above content) and last 4 goes to the other menu (below content). I tried to achieve something like this in I18N Navigation plugin but I cant figure it how to make such a thing. Is it possible to make something like this?
You could do this by putting the pages under two dummy parent pages (make sure to set 'add to menu' for them), e.g.:
Code:
dummy-top
index
page1
page2
page3
dummy-bottom
page4
page5
page6
page7
Then you can display the menus like this:
Code:
<?php
$bc = return_i18n_breadcrumbs(return_page_slug());
// top menu
get_i18n_navigation($bc[0]['url']=='dummy-top'?return_page_slug():'dummy-top',1,99);
...
// bottom menu
get_i18n_navigation($bc[0]['url']=='dummy-bottom'?return_page_slug():'dummy-bottom',1,99);
?>
This is pretty nice, but there's a trouble with it - you've got "dummy-top" and "dummy-bottom" in your URL right after (the url is like yourweb.com/dummy-bottom/a-page), so you have to figure out a better name for it. Thanks anyway, luckily, I've found your doc
http://mvlcek.bplaced.net/multi-level-na...-children/
Posts: 52
Threads: 2
Joined: May 2013
There's also
this and
this.
Posts: 1,127
Threads: 136
Joined: Feb 2012
2013-12-09, 20:25:22
(This post was last modified: 2013-12-10, 02:51:46 by Timbow.)
Or there is some obscure css which would allow you to separate out the first four from the last four, something like
Code:
nav>a:nth-of-type(-n+4) { display: none;}
but I don't know what browsers would recognise it, probably not many.
If it was me I think I would want to just write out the footer menu and put it in the template with a footer.inc.php file or with a component. Probably less bother in the end.