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

Type: Discussion
Status: New
8wesomeness
View Replies:
c5mix replied on at Permalink Reply
c5mix
8wesomeness replied on at Permalink Reply
8wesomeness
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
c5mix replied on at Permalink Reply
c5mix
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/...
8wesomeness replied on at Permalink Reply
8wesomeness
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

$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';


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.
c5mix replied on at Permalink Reply
c5mix
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).

concrete5 Environment Information

Browser User-Agent String

Hide Post Content

This will replace the post content with the message: "Content has been removed by an Administrator"

Hide Content

Request Refund

You have not specified a license for this support ticket. You must have a valid license assigned to a support ticket to request a refund.