I have a very small change to make: changing the main_nav class to main_nav_anythingelse. The existing name is adding residual styling to Ubermenu and causing it to scale improperly when the window gets narrow (smartphone), so it needs to be changed.
I'm already using a child theme (Base Theme), so I assume that the altered code goes somewhere there, but I'm not sure where, or if there's a better way to do it.
I should also say, that when I alter it right in the nav/section.php file, it does what I want it to do, but I obviously don't want to be making that change right in the theme files.
Thanks,
jt
Best Way To Customize The Nav Classic Section?
Started by
artemesia66
, Oct 29 2012 02:41 PM
custom menu ubermenu
5 replies to this topic
#1
Posted 29 October 2012 - 02:41 PM
#2
Posted 29 October 2012 - 02:53 PM
If you're working with the menu, you'd need to add the section.php file for the nav to the base theme and edit the file there.
#3
Posted 29 October 2012 - 03:00 PM
Thanks, Catrina. I'm a bit unsure how to do that. Are there instructions you could point me to?
Do I copy the whole nav section folder to the base theme sections folder or just the php file? Or are you talking about copying the section.php into something else?
cheers,
jt
Do I copy the whole nav section folder to the base theme sections folder or just the php file? Or are you talking about copying the section.php into something else?
cheers,
jt
#4
Posted 29 October 2012 - 03:19 PM
aremesia66 -
There are a couple ways you can do it.
For simple modifications, you can create a template.SECTIONNAME.php (where SECTIONNAME is the folder name of the section) file in the root of your child theme. This file will override the section_template of the section's class.
This is a quick and handy way to override section output that also allows you access to the section class's properties and methods.
Or like Catrina said, you can copy the section's section.php file into your child theme like this: childthemeroot/sections/sectionfoldername/section.php. This will override the section's section.php file (if you need to customize more there than just the template) with your customized one, but still load all the other section files like LESS/CSS or other images.
For more advanced modifications, you can just copy the whole section from core, into your child theme's sections folder. If you leave the core section you are copying activated, it will load that section's LESS/CSS even when you are overriding it with your section, so assuming you have the pagelines sections plugin installed, you can go into the Store under Pagelines, go to sections, and disable it under core so that just your custom one is activated. Then you can customize it however you want! Turn it into something totally new if you want.
Hope that helps!
There are a couple ways you can do it.
For simple modifications, you can create a template.SECTIONNAME.php (where SECTIONNAME is the folder name of the section) file in the root of your child theme. This file will override the section_template of the section's class.
This is a quick and handy way to override section output that also allows you access to the section class's properties and methods.
Or like Catrina said, you can copy the section's section.php file into your child theme like this: childthemeroot/sections/sectionfoldername/section.php. This will override the section's section.php file (if you need to customize more there than just the template) with your customized one, but still load all the other section files like LESS/CSS or other images.
For more advanced modifications, you can just copy the whole section from core, into your child theme's sections folder. If you leave the core section you are copying activated, it will load that section's LESS/CSS even when you are overriding it with your section, so assuming you have the pagelines sections plugin installed, you can go into the Store under Pagelines, go to sections, and disable it under core so that just your custom one is activated. Then you can customize it however you want! Turn it into something totally new if you want.
Hope that helps!
#5
Posted 29 October 2012 - 04:26 PM
Thanks to both of you. I ended up using the second method from Evan's list. For some reason, using the template.nav.php threw an error.--most likely me understanding just enough php to be dangerous. In any case, I now understand the principals better as well as solving my problem.
#6
Posted 29 October 2012 - 10:36 PM
The topic was marked as resolved.
Also tagged with one or more of these keywords: Resolved, custom, menu, ubermenu
PageLines Framework →
Customizations →
menu bar plaStarted by depaart , 14 May 2013 |
|
|
||
PageLines Framework →
Customizations →
Multilangue menùStarted by hmc_web , 03 May 2013 |
|
|
||
PageLines Framework →
Technical Support →
Adding a header inside a menu list, like in BootstrapStarted by kneops , 30 Apr 2013 |
|
|
||
PageLines Framework →
Customizations →
How can I create a new custom section?Started by andreia24 , 26 Apr 2013 |
|
|
||
PageLines Framework →
Technical Support →
Top-Menu alignment for the Mobile versionStarted by integritymediacorp , 22 Apr 2013 |
|
|











