LESS Stylesheets

by Ondrej Machala (Kentico)
LESS Stylesheets preview

Price

$0

Details

Licence:
Apache 2.0
Works with:
7.0
Version:

Web site

http://www.kentico.com

Summary

LESS is a dynamic stylesheet language that extends CSS. The features of LESS allow you to write stylesheet code that is shorter and easier to maintain.

Description

With the LESS Stylesheets module, you can create stylesheets containing LESS syntax in Kentico CMS. The system compiles the LESS code and saves the CSS output into standard stylesheets, which you can assign to websites or individual pages.

Read this document before you install the module.

Note: This module is only intended for Kentico 7. To use LESS on Kentico 8, download the Less preprocessor.

Comments


Ondrej Machala commented on

Please ensure that "Import files" option is enabled while importing package (see step #5 in installation instructions). If the problem persists I strongly recommend you to contact our support.

Alexander commented on

Hi Ondrej.
Thank you for the answer.
Package wasn't exported successfully. Kentico doesn't create "LessStylesheets" folder. So, I did it manually. I created it at the next path "CMSModules -> LessStylesheets". I unzip package and rename all files in "Data -> Files -> cms_resource -> LessStylesheets -> CMSModules -> LessStylesheets " folder. I remove ".export" extension manually. I did it with all files in folder and in subfolders.
I create LessStylesheets folder in CMSModules them. and copy files into this folder.

Ondrej Machala commented on

Thank you, Alexander. Are you sure that the package has been imported successfully? Could you repeat the procedure? And what version including hotfix number are you using?

Alexander commented on

Hi Ondrej.
project installed as web project.

Ondrej Machala commented on

Hi Alexander,

Is your Kentico project installed as a web application or as a web project? In case of a web application, did you rebuild your project?

Alexander commented on

Hi!

I try to install package. I do all exactly as mentioned in documentation. But, when I open '{LESS}Stylesheet' menu I get next error

Parser Error Message: Could not load type 'CMSModules_LessStylesheets_Less_List'.
Line 1: <%@ Page Language="C#" AutoEventWireup="true" Inherits="CMSModules_LessStylesheets_Less_List"
Line 2: MasterPageFile="~/CMSMasterPages/UI/SimplePage.master" Theme="Default" Title="{less} Stylesheets"
Line 3: EnableEventValidation="false" CodeBehind="Less_List.aspx.cs" %


I don't see CMSModules_LessStylesheets_Less_List file in 'LessStylesheets' folder. What I must do in this case?

kentico_ondrejv commented on

Hi folks,

Should you need LESS preprocessor for Kentico 8, you can find the special application here: http://devnet.kentico.com/marketplace/integration/less-preprocessor

steve commented on

My mistake, my last comment was caused by user error! I just needed to learn a bit more about LESS to understand how to apply the Mixins correctly. Great job, awesome module! Thank you!

steve commented on

Has this been tested with 7.0.40? The install process went smoothly, but I'm having an issue.

I have access to the LESS module, the LessStylesheetsTable custom table is present, and some code is being written to my standard stylesheet, however no CSS is being generated from my LESS stylesheet. All of the comments are carrying over, but all mixins I copied from the Default mixins sheet are not being saved to my coupled stylesheet.

Any ideas? Thank you for your help!

FroggEye commented on

When looking back, I can't say for sure if I checked that but I do know I clicked the link to Select all objects and clicked OK to the warning about overwriting all items. When I tried it again, it didn't select any items that already existed even though I "Selected all objects". So that was probably my problem is the "Select all objects" didn't work as expected.

Ondrej Machala commented on

Hi FroggEye,

Thank you for your feedback. Please, could you confirm that you have followed the steps described in the installation instructions, especially the step #5? I.e. while importing the package, have you selected the object "Global objects ->
Development -> Modules -> Site Manager"?

FroggEye commented on

Great addition! Looking forward to having all the other supporting features (versioning, store in file system, etc) in v8 with this.

Had one problem, I installed on v7 hotfix 36 and all the files copied, I'm able to see the module (Site Manager>Development>Modules) but the UI part that should be in Site Manager>Development isn't showing. In the directions it's #2 under "Creating LESS stylesheets". Maybe missed exporting the Site Manager module as well for the settings in the Development element?

For those of you who would like to manually add the UI element go to Site Manager>Development>Modules>Site Manager module. Select the User interface tab. Select the Development element and click New element. Enter display name of "{LESS} stylesheets". Enter Code name of "LessStyleSheets". Enter Caption of "{LESS} stylesheets". Enter Target URL of "~/CMSModules/LessStylesheets/Less_List.aspx". Enter Icon path of "/CMSModules/LessStylesheets/img/less_icon_24.png". And I copied the description from this page into the description area.

Good luck and thanks again for the nice module!