Jump to content


Photo
- - - - -

New Section Not Reading LESS file

section development less

  • Please log in to reply
3 replies to this topic

#1 tforasiepi

tforasiepi

    Advanced Member

  • Members


  • 30 posts
  • Country: Country Flag

Posted 03 August 2014 - 09:58 PM

Hi,  

 

I want to use the NavBar section, but need to modify its functionality and style.  I followed the developer documents on creating a new section.  The section seems to be working sans the .LESS styling.  Is there a more detailed tutorial or is there some code that needs to be added somewhere to tell the new section what .LESS file to use?

 

Here is my structure:

   lccs/wp-content/themes/dms_child_lccs/sections/navbar_bluelogic

 

In the Section.php file I changed it to:

/*
Section: navbar_bluelogic
Author: PageLines
Description: A responsive navigation bar for your website.
Class Name: navbar_bluelogic
Workswith: header
Loading: active
Filter: nav, dual-width
*/

 

I also changed the class .navbar in the .LESS file (in the navbar_bluelogic section folder) to .navbar_bluelogic.  But I have not found the secret handshake... Can someone help?

 

Thanks!



#2 Danny

Danny

    Is Awesome!

  • Moderators
  • 17931 posts
  • LocationManchester, UK
  • Country: Country Flag

Posted 04 August 2014 - 09:21 AM

Hi,

 

You have likely not changed the class name on the following code in the sections.php file.

 

/**
 * Main section class
 *
 * @package PageLines DMS
 * @author PageLines
 */
class PLNavBar extends PageLinesSection {
 
Also, if you have changed the .navbar class to something else, then you're going to need to replace every single instance of .navbar throughout the section.php file to. Otherwise, your LESS/CSS will not work as the class name isn't associated to any HTML.


#3 tforasiepi

tforasiepi

    Advanced Member

  • Members


  • 30 posts
  • Country: Country Flag

Posted 05 August 2014 - 03:30 PM

Hi,

Thanks for your help with this.  I have changed the name of the Main Section Class to BLNavBar and also made the revision in the Header Class Name to BLNavBar.  I can add the new section to my page and change the menu it uses, so it seems to be working.  But it does not pick up the LESS file, so there is no styling applied to the new navigation bar. I have not changed the .navbar class... should I do this?  If not, are there any other steps I can take to get the section to respond to the LESS file?

 

Thanks again.



#4 Danny

Danny

    Is Awesome!

  • Moderators
  • 17931 posts
  • LocationManchester, UK
  • Country: Country Flag

Posted 06 August 2014 - 09:33 AM

I am not sure what you mean it doesn't pick up the less file, are you saying the section has no styling whatsoever or it is not picking up the custom CSS/LESS you have added ?







Also tagged with one or more of these keywords: section, development, less