Nav Control for English & Spanish
Permalink Browser Info Environment
I'm fairly new to C5, but like what I've seen so far. I'm creating a site right now that needs to be in english and spanish. And i think the easiest way to achieve what I want is to have a custom menu in each section. So the option i'm wanting to choose is "Display Pages" > "Beneath a particular page"
I do not believe I have control to do this. Please advise.
Thanks,
Levi
I do not believe I have control to do this. Please advise.
Thanks,
Levi
Type: | Discussion |
---|---|
Status: | New |
I'm not sure I found the answer i was looking for. My client is fluid in both languages, so ideally, I would just like to duplicate the english site, and have them translate into spanish. The only issue is, I don't think i have the ability to control what shows up in the nav.
Thanks,
Levi
Thanks,
Levi
You should check out the Internationalization addon. Should do exactly what you need. Then, you just have to replace the hardcoded autonav in the theme's header.php file to an area that you can add an autonav block to and configure it accordingly (mentioned in those links above).
http://www.concrete5.org/marketplace/addons/internationalization/...
http://www.concrete5.org/marketplace/addons/internationalization/...
Ok, I think I've figured it out. But below was my question.
I'm really wracking my brain on this one.
I've replaced the code in the slate them
with:
I'm not sure how the slate_main_php.php and the suggested header_menu_dropdown.php integrate in the last line of code.
I've tried linking to both files, however the result is the same. Both the Spanish and the English navigation appear, with broken styles.
If you have another work around for having two nav menus that would be fine. I don't need the Internationalization add-on. I just need two menus that fit the slate theme.
thanks.
I'm really wracking my brain on this one.
I've replaced the code in the slate them
$bt = BlockType::getByHandle('autonav');
with:
$bt = BlockType::getByHandle('autonav'); $lh = Loader::helper('section', 'multilingual'); if($lh->getLanguage() == "es_CL") { $navPageRoot = Page::getByPath('/spanish'); } else if($lh->getLanguage() == "en_US") { $navPageRoot = Page::getByPath('/english'); } if ($navPageRoot->cID) { $bt->controller->displayPages = 'custom'; $bt->controller->displayPagesCID = $navPageRoot->getCollectionID(); } else { $bt->controller->displayPages = 'top';
Viewing 15 lines of 21 lines. View entire code block.
I'm not sure how the slate_main_php.php and the suggested header_menu_dropdown.php integrate in the last line of code.
I've tried linking to both files, however the result is the same. Both the Spanish and the English navigation appear, with broken styles.
If you have another work around for having two nav menus that would be fine. I don't need the Internationalization add-on. I just need two menus that fit the slate theme.
thanks.
Just replace the hardcoded autonav block with a defined area like shown here:http://www.concrete5.org/marketplace/themes/slate/support/multiling...
Then you can just add an autonav block to that area and have it display by whatever properties you want. Just make sure you select the Slate Main Nav custom template (click on the autonav block in edit mode and choose Custom Template from the options).
Then you can just add an autonav block to that area and have it display by whatever properties you want. Just make sure you select the Slate Main Nav custom template (click on the autonav block in edit mode and choose Custom Template from the options).
http://www.concrete5.org/marketplace/themes/slate/support/multiling...
http://www.concrete5.org/community/forums/internationalization/auto...