CMS MADE SIMPLE FORGE

CMS Made Simple Core

 

[#10857] cms_stylesheet writeCache update

avatar
Created By: Mathieu Muths (airelibre) (airelibre)
Date Submitted: Mon Jan 25 12:06:16 -0500 2016

Assigned To:
Version: 2.1.1
CMSMS Version: 2.1.1
Severity: Minor
Resolution: Fixed
State: Closed
Summary:
cms_stylesheet writeCache update
Detailed Description:
Hello,

Before (1.12), the {cms_stylesheet} plugin did:

- Combine all the CSS content to a $string
- Give it to cms_stylesheet_writeCache which fetches one string


Now in CMSMS 2.1.1, {cms_stylesheet} does:
- Generate a $list of stylesheets
- Send that list to cms_stylesheet_writeCache
- For every CSS string, smarty fetches it


If everything works fine, that new behaviour makes the Smarty prefilter and
postfiler to be executed as many times as there are stylesheets.

The problems comes when a module wants to plugs itself on the CSS content to
make some preprocessing.

In CSSPreprocessor module, I need to get the whole CSS string to parse it (LESS
/ SASS / Whatever) and return a compiled CSS version to {cms_stylesheet}

Today, such a thing is impossible when you have more than 1 stylesheet

Hope it's clear enough - if not, please contact me..


History

Comments
avatar
Date: 2016-05-12 10:42
Posted By: Robert Campbell (calguy1000)

Fixed for CMSMS 2.2
As there is now a StylesheetPostRender Event that you can use to post-process
the css before it is saved to disk.
      
avatar
Date: 2017-06-10 11:00
Posted By: Robert Campbell (calguy1000)

CMSMS 2.2 is released
      
Updates

Updated: 2017-06-10 11:00
state: Open => Closed

Updated: 2016-05-12 10:42
resolution_id: => 7