[SOLVED] {cms_stylesheet} tag not combining stylesheets

For questions and problems with the CMS core. This board is NOT for any 3rd party modules, addons, PHP scripts or anything NOT distributed with the CMS made simple package itself.
Post Reply
cypher6x
Forum Members
Forum Members
Posts: 13
Joined: Mon Jul 09, 2012 11:27 am

[SOLVED] {cms_stylesheet} tag not combining stylesheets

Post by cypher6x »

Hi

I have a cmsms installation 1.10.3 which I have been upgrading since version 1.3.

I have been using the {cms_stysheet} tag since it was introduced and it is placed in the <head> section of the template just like this

Code: Select all

{cms_stysheet}
I expect the stylesheets to be combined the out put is still one link per stylesheet like below

Code: Select all

<link rel="stylesheet" type="text/css" href="http://www.example.com/tmp/cache/stylesheet_77b7120576d3bf8ef7f990847075d390.css" media="screen"/>
<link rel="stylesheet" type="text/css" href="http://www.example.com/tmp/cache/stylesheet_5210570935bf6e18b07424e75fb6924f.css" media="screen"/>
(+ 17 more)........
I have a total of 17 stylesheets applied to the templates. I have another template with only 4 stylesheets applied and in this case, the output has a combined stylesheet.

Is there a limit on the number of stylesheets you can have on a template to enable combining?

I have tested by using the template which only had 4 and adding 13 more and again the output was not combined.
Last edited by cypher6x on Mon Jul 09, 2012 1:13 pm, edited 1 time in total.
uniqu3

Re: {cms_stylesheet} tag not combining stylesheets on output

Post by uniqu3 »

only if stylesheet have same media type are combined.
Behavior has been improved for 1.11 so best to wait for final ;)
cypher6x
Forum Members
Forum Members
Posts: 13
Joined: Mon Jul 09, 2012 11:27 am

Re: {cms_stylesheet} tag not combining stylesheets on output

Post by cypher6x »

Yup, I noticed that whilst looking at the code.

I assume when you combine in 1.11 you will use

Code: Select all

@media screen
{
....stylesheet 1 contents
}

@media screen, handheld
{
....stylesheet 2 contents
}

@media print
{
....stylesheet 3 contents
}
I looks pretty easy to add in the cms_stylesheet plugin.

If so, i will make the modifications locally and hopefully the upgrade won't affect the functionality.
uniqu3

Re: [SOLVED] {cms_stylesheet} tag not combining stylesheets

Post by uniqu3 »

You can use inline media queries in 1.10.3, that has nothing to do with 1.11.
I can not imagine having stylesheets scattered across 17 files but you can also only attach "screen" media type to your template and include other stylesheet simply in template like {cms_stylesheet name='my-print-template'} and so on.
Post Reply

Return to “CMSMS Core”