Having 2 languages.
Permalink 1 user found helpful
Hai,
I want to have two languages on my site.
I followed this tutorial:
http://www.concrete5.org/documentation/how-tos/editors/building-sit...
BUT I can`t figure out how to do the last step because of that my theme has it`s own auto-nav layout (Yosemite):
http://www.concrete5.org/marketplace/themes/yosemite/...
If you looked at the screenshot I mean the menu above the picture.
Could someone help me with the last step?
I just can`t figure Concrete5 programming.
I want to have two languages on my site.
I followed this tutorial:
http://www.concrete5.org/documentation/how-tos/editors/building-sit...
BUT I can`t figure out how to do the last step because of that my theme has it`s own auto-nav layout (Yosemite):
http://www.concrete5.org/marketplace/themes/yosemite/...
If you looked at the screenshot I mean the menu above the picture.
Could someone help me with the last step?
I just can`t figure Concrete5 programming.
And If I may ask: How do I do it?
I have problems with understanding other mans coding. So a good explanation would be appriciated.
I have problems with understanding other mans coding. So a good explanation would be appriciated.
How are you including the block?
You shouldn't be touching any code when modifying the auto-nav block. In the auto-nav block you can select on what level the subpages are printed out OR if you want to show pages below a certain page you can choose.
Here's a bit more information about the block:
http://www.concrete5.org/documentation/editors-guide/in-page-editin...
But, if you're doing it statically e.g. from your theme, you probably need to set few variables straight for the controller. There are few topics around this forum about this that I can point to you (if I can find them) if this is the case.
Antti
You shouldn't be touching any code when modifying the auto-nav block. In the auto-nav block you can select on what level the subpages are printed out OR if you want to show pages below a certain page you can choose.
Here's a bit more information about the block:
http://www.concrete5.org/documentation/editors-guide/in-page-editin...
But, if you're doing it statically e.g. from your theme, you probably need to set few variables straight for the controller. There are few topics around this forum about this that I can point to you (if I can find them) if this is the case.
Antti
It`s the second case.
My theme has a own `Auto-Nav` so it can only be modified by changing the code.
If it would be a normal Auto-Nav it wouldent be a problem.
To be clear:
Theme has on top a navigation bar that isn`t a block but piece of code.
And I found the whole code structure but I actually don`t know what to do with it and more important how.
My theme has a own `Auto-Nav` so it can only be modified by changing the code.
If it would be a normal Auto-Nav it wouldent be a problem.
To be clear:
Theme has on top a navigation bar that isn`t a block but piece of code.
And I found the whole code structure but I actually don`t know what to do with it and more important how.
Ok, could you paste in the code here. Probably the best way to go here would be to actually change it to use the auto-nav. However, it probably has some custom classes etc. defined that might not be that easy to do with the auto-nav.
Seeing what your template does, would help us further here...
Antti
Seeing what your template does, would help us further here...
Antti
My theme is:
http://www.concrete5.org/marketplace/themes/yosemite/...
And as you can see the menu bar above thats the one I need to modify.
I will just put few files in the attachement.
http://www.concrete5.org/marketplace/themes/yosemite/...
And as you can see the menu bar above thats the one I need to modify.
I will just put few files in the attachement.
Here is what you need to modify:
And this the correct place:
Try to play around with the "displayPages" option. You can find the possible options to put there from:
And you want to take a look in the AutonavBlockController::generateNav() where you can see these in the switch-clause.
To help you out, I'll even take the possibilities from there here:
- current
- top
- above
- below
- second_level
- third_level
- custom
Probably it will work if you set it to "second_level" although I'm not 100% sure about this.
Antti
/yosemite/themes/yosemite/elements/header.php
And this the correct place:
$bt_nav = BlockType::getByHandle('autonav'); $bt_nav->controller->displayPages = 'top'; $bt_nav->controller->orderBy = 'display_asc'; $bt_nav->controller->displaySubPages = 'none'; $bt_nav->render('templates/header_menu');
Try to play around with the "displayPages" option. You can find the possible options to put there from:
/concrete/blocks/autonav/controller.php
And you want to take a look in the AutonavBlockController::generateNav() where you can see these in the switch-clause.
To help you out, I'll even take the possibilities from there here:
- current
- top
- above
- below
- second_level
- third_level
- custom
Probably it will work if you set it to "second_level" although I'm not 100% sure about this.
Antti
Wauw I thank you very much cause it worked!
This will make my work much and much easier.
And as you suggested it was the `second_level`
This will make my work much and much easier.
And as you suggested it was the `second_level`
http://www.concrete5.org/marketplace/addons/internationalization/...
For the menu, you just need to customize it to use the correct language tree root.
Br,
Antti / Mainio