top nav
Permalink Browser Info Environment
Hello
I purchased your theme and i really like it so far, but i stumbled on 1 big issue on Nav menu:
i need the site to have 3 languages, and later maybe more.
So, for the top menu, it shows ALL the pages and subpages with no way to hide some or select what level to show, like amiant css3 menu does, that i use a lot, but it's not responsive...
.
So, i would appreciate if you could point me, where to look, and what to change in the Topnav Template, or elsewhere so i can choose the nav level or under what page i show the menu.
For the Global thing , i can erase the word Global near the Area in the header.php, right?
Thank you in advance
George
I purchased your theme and i really like it so far, but i stumbled on 1 big issue on Nav menu:
i need the site to have 3 languages, and later maybe more.
So, for the top menu, it shows ALL the pages and subpages with no way to hide some or select what level to show, like amiant css3 menu does, that i use a lot, but it's not responsive...
.
So, i would appreciate if you could point me, where to look, and what to change in the Topnav Template, or elsewhere so i can choose the nav level or under what page i show the menu.
For the Global thing , i can erase the word Global near the Area in the header.php, right?
Thank you in advance
George
Type: | Ticket |
---|---|
Status: | Archived |
Hi Gareth
Thank you for your fast reply
I had already seen this area of code in the topnav-template, so i have
1 more question on that:
how to tell the menu to show all pages beneath a particular page, i.e. English, Russian etc.
And If i do change that, then in the russian section of the site i must have an altered version of the topnav template, i.e. topnav-rus, to show this section, right?
And the same for English etc, right?
So, how do i make the topnav editable from within the page?
A lot of questions, but need help badly , not being a C5 guru...
Greetings
George
Thank you for your fast reply
I had already seen this area of code in the topnav-template, so i have
1 more question on that:
how to tell the menu to show all pages beneath a particular page, i.e. English, Russian etc.
And If i do change that, then in the russian section of the site i must have an altered version of the topnav template, i.e. topnav-rus, to show this section, right?
And the same for English etc, right?
So, how do i make the topnav editable from within the page?
A lot of questions, but need help badly , not being a C5 guru...
Greetings
George
I think the best idea would be to remove the hardcoded autonav and replace it with a global area i.e.;
Then you can put any page into edit mode and add an autonav block which suits your requirements. Just ensure you choose the custom template for your new block called TopNav so the styling is the same.
<?php $a = new GlobalArea('Navigation'); $a->display(); ?>
Then you can put any page into edit mode and add an autonav block which suits your requirements. Just ensure you choose the custom template for your new block called TopNav so the styling is the same.
Hi Gareth
I tried it myself, exactly what you propose here, hoping it will work, but no...
It gives a message of the kind: ../concrete/core/model/area.php error in line 566
(displayed in code inside the website , in the place of the menu)
Do i need to change something in code in some other file?
I know that we are very close to a solution but some more advice would be really apperciated
Thank you
George
I tried it myself, exactly what you propose here, hoping it will work, but no...
It gives a message of the kind: ../concrete/core/model/area.php error in line 566
(displayed in code inside the website , in the place of the menu)
Do i need to change something in code in some other file?
I know that we are very close to a solution but some more advice would be really apperciated
Thank you
George
That should have worked. Please ensure you have the <nav> tags as well:
replace
with
replace
<nav class="top-bar contain-to-grid centered" data-topbar data-options="mobile_show_parent_link: true"> <?php $bt_main = BlockType::getByHandle('autonav'); $bt_main->controller->displayPages = 'top'; $bt_main->controller->orderBy = 'display_asc'; $bt_main->controller->displaySubPages = 'all'; $bt_main->controller->displaySubPageLevels = 'custom'; $bt_main->controller->displaySubPageLevelsNum = '3'; $bt_main->render('templates/topNav'); ?> </nav>
with
<nav class="top-bar contain-to-grid centered" data-topbar data-options="mobile_show_parent_link: true"> <?php $a = new GlobalArea('Navigation'); $a->display(); ?> </nav>
Yesssss!
My friend with your very helpful and detailed advices, you managed to solve my problem!
Excellent support, both on speed and efficiency.
5 stars from me!
Will write a review very soon
Thanks again
George
My friend with your very helpful and detailed advices, you managed to solve my problem!
Excellent support, both on speed and efficiency.
5 stars from me!
Will write a review very soon
Thanks again
George
No worries George. Thanks very much.
Attention: Since there has been no activity on this issue for two weeks, this issue has been automatically archived.
To re-open this issue, reply to this message.
To re-open this issue, reply to this message.
I'm not exactly sure of what you need but to change the top nav menu you can find the hard-coded section in the file: packages/theme_hi_vis/themes/hi_vis/elements/header.php.
You can change the settings in the following lines of code:
So to change the levels you can change:
to
And yes if you remove the Global from GlobalArea the area will no longer show the same content on all pages. Please note the the topnav which is hard-coded is below the Global Area which typically is for the sitename or logo.
Regards,
Gareth