Jump to content

  • You cannot start a new topic
  • You cannot reply to this topic

Adding A Custom Less File Only To Specific Layout Page Rate Topic   - - - - -

 
  • SwimShady
  • Advanced Member
  • Members
  • Join Date: 05-Aug 14
  • 87 posts

Posted 26 July 2017 - 10:26 PM #1

I need to make changes to one specific Layout page and I'm wondering if it's possible to point to a copy of a .less files for that specific layout only?

 

The way I was thinking I can possibly do it is make a copy of "grid.less" for example, and link to the copy in the settings of the Layout page under "Custom HTML code" like so:

 

<link rel="stylesheet/less" type="text/css" href="website.com/design/themes/responsive/templates/addons/my_changes/grid.less" />

 

 

...But it doesn't seem to work

 

Anyway to change a less file only for one layout?

 

Thanks.



 
  • beencart
  • Senior Member
  • Authorized Reseller
  • Join Date: 27-Feb 17
  • 191 posts

Posted 27 July 2017 - 06:03 AM #2

I need to make changes to one specific Layout page and I'm wondering if it's possible to point to a copy of a .less files for that specific layout only?

 

The way I was thinking I can possibly do it is make a copy of "grid.less" for example, and link to the copy in the settings of the Layout page under "Custom HTML code" like so:

 

<link rel="stylesheet/less" type="text/css" href="website.com/design/themes/responsive/templates/addons/my_changes/grid.less" />

 

 

...But it doesn't seem to work

 

Anyway to change a less file only for one layout?

 

Thanks.

 

Hello! You should put this code:

<link rel="stylesheet" type="text/css" href="//website.com/design/themes/responsive/templates/addons/my_changes/grid.less" />


 
  • eComLabs
  • CS-Cart Expert
  • Authorized Reseller
  • Join Date: 27-Jan 14
  • 19763 posts

Posted 27 July 2017 - 07:18 AM #3

As alternative, you can create HTML block on this layout page and use < style > tag to add extra styles


GET A FREE QUOTE | CS-Cart Add-ons | CS-Cart Licenses | CS-Cart Development | CS-Cart Design | Server Configuration | UniTheme and YOUPI
CS-Cart                USD 345     Multi-Vendor              USD 1250    CS-Cart RU                         24500 руб.
CS-Cart Ultimate  USD 775     CS-Cart + YOUPI      USD 545      CS-Cart RU + UniTheme    36000 руб.


 
  • SwimShady
  • Advanced Member
  • Members
  • Join Date: 05-Aug 14
  • 87 posts

Posted 27 July 2017 - 07:07 PM #4

Thanks beencart, but it still doesn't work. It doesn't recognize changes I do to that grid.less file in my changes.

 

 

eCom: That would work for regular css, but as you suggested in another thread, I would need to modify the less as I need to modify the grid and that requires .less mathematical operators.



 
  • beencart
  • Senior Member
  • Authorized Reseller
  • Join Date: 27-Feb 17
  • 191 posts

Posted 28 July 2017 - 06:29 AM #5

Thanks beencart, but it still doesn't work. It doesn't recognize changes I do to that grid.less file in my changes.

 

Is your file included? Probably the styles are not overwritten because you need to use "!important" etc.



 
  • eComLabs
  • CS-Cart Expert
  • Authorized Reseller
  • Join Date: 27-Jan 14
  • 19763 posts

Posted 28 July 2017 - 06:42 AM #6

eCom: That would work for regular css, but as you suggested in another thread, I would need to modify the less as I need to modify the grid and that requires .less mathematical operators.

 

Note that you you can add extra class to the main grid

 

http://prntscr.com/g1aobt

 

Just use common styles.less file of your addon but add rules for your new class. In this case they will be applied on this page only


GET A FREE QUOTE | CS-Cart Add-ons | CS-Cart Licenses | CS-Cart Development | CS-Cart Design | Server Configuration | UniTheme and YOUPI
CS-Cart                USD 345     Multi-Vendor              USD 1250    CS-Cart RU                         24500 руб.
CS-Cart Ultimate  USD 775     CS-Cart + YOUPI      USD 545      CS-Cart RU + UniTheme    36000 руб.