Jump to content
Sign in to follow this  
888voip

Child Theme PageLinesNav

Recommended Posts

888voip

Hello, I am attempting to Child Theme PageLines Navigation. However it does not seem to be working for me. I have been able to successfully replicate the pull quote example so I am somewhat familiar with basic child theme construction. The Pagelines Nav is a bit more complicated though as it is within its own folder and relies on sub files. Here is what I have done so far... Copied the entire nav folder into platformbase/sections to create platformbase/sections/nav. Within that folder I have edited section.nav.php and renamed it to section.mgeNav.php. Here is a snippet of code I have changed:

class mgeNav extends PageLinesSection {
	
	        static $nav_url;
	        static $nav_dir;
	
	   function __construct( $registered_settings = array() ) {
	
	                $name = __('mgeNav', 'pagelines');
	                $id = 'mgeNav';
	
	                $default_settings = array(
	                        'name'                  => false,
	                        'id'                    => false,
	                        'type'                  => 'header',
	                        'workswith'     => array('header'),
	                        'description'   => 'MGE Primary Site Navigation.',
	                        'folder'                => 'nav',
	                        'init_file'     => 'nav.php',
	                        'icon'                  => CORE_IMAGES . '/admin/map.png'
As you can see I changed the class, the name and ID to my new section type. I have also included within my base theme functions.php the following line:
pagelines_register_section('mgeNav', 'mgeNav');

However no navigation "MGE Navigation" shows up in applicable sections. Is there an additional step when creating a child theme that uses a subfolder? Thank you.

Share this post


Link to post
Share on other sites
cmunns

try: `pagelines_register_section('mgeNav', 'mgeNav', null, array('child' => true));`

Share this post


Link to post
Share on other sites
888voip

Worked as long as I kept the section in the root sections folder. When using child themes is this always the case, you cannot use subfolders?

Share this post


Link to post
Share on other sites
Kate

Hey John, Not always... But, if you've found that it doesn't work with the copied folder structure, then you can try it in the root.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this  

×