<![CDATA[ A Style Sheet Manager - My Forums]]> https://forums.modx.com/thread/?thread=24635 <![CDATA[Re: A Style Sheet Manager]]> https://forums.modx.com/thread/24635/a-style-sheet-manager?page=2#dis-post-464006 In previous versions of ModX (Evo and Revo), you used to have to go through tricks. Now with 2.2.2pl, it is possible with very few tricks. The information to do this is sparse and inaccurate any more. Here's how you do it:
Create Your Template

Create a new Template. I named mine CSS Stylesheet. (Simple as that)

For the content, simply put [[*content]].

Create Your CSS Page

Create a new resource. Name it whatever you would like.

Add your alias. Make sure you do not add the .css at the end. ModX should do this for you.

Now, make sure your new page is published. You may also want to hide from menus.

Add your CSS code. No funny tricks... Just copy and paste it like you normally would.

Test the Stylesheet

Simply navigate directly to your new page as if it were an html document. Don't forget the .css instead of .html. If you see the CSS code, then you've succeeded.
Add Your CSS to the Templates

This one is the tricky part. You won't be able to use the <link rel=></link>.

Simply go to your <head> element. Add the following code:

<style type="text/css"> @import url(""); </style>

Test the

Inside the url("");, just place the url to your new resource.
]]>
leelondon Apr 23, 2013, 07:16 AM https://forums.modx.com/thread/24635/a-style-sheet-manager?page=2#dis-post-464006
<![CDATA[Re: A Style Sheet Manager]]> https://forums.modx.com/thread/24635/a-style-sheet-manager#dis-post-126083 sottwell Mar 25, 2006, 08:34 AM https://forums.modx.com/thread/24635/a-style-sheet-manager#dis-post-126083 <![CDATA[Re: A Style Sheet Manager]]> https://forums.modx.com/thread/24635/a-style-sheet-manager#dis-post-126082 Quote from: davidm at Mar 25, 2006, 01:27 PM
Duh ? There is someone working on that, Helene integration ??
Umm... probably not. I got the impression that someone had tried it. Sorry, wrong choise of words...

Hopefully we’ll get Helene or some other editor implemented. smiley]]>
mandrl Mar 25, 2006, 07:46 AM https://forums.modx.com/thread/24635/a-style-sheet-manager#dis-post-126082
<![CDATA[Re: A Style Sheet Manager]]> https://forums.modx.com/thread/24635/a-style-sheet-manager#dis-post-126081 Quote from: mandrl at Mar 25, 2006, 12:12 PM
EDIT: oh, they do exist. I wonder if the Helene integration has gone anywhere...Thanks for the CSS tip. smiley

Duh ? There is someone working on that, Helene integration ??

Anyway, I didn’t know about Helene, nice pointer thanks a lot !
The community being what it is, I wouldn’t be surprised something like that would come up one day grin
]]>
davidm Mar 25, 2006, 07:27 AM https://forums.modx.com/thread/24635/a-style-sheet-manager#dis-post-126081
<![CDATA[Re: A Style Sheet Manager]]> https://forums.modx.com/thread/24635/a-style-sheet-manager#dis-post-126080 Quote from: davidm at Mar 14, 2006, 10:06 AM

Plus, I’d dream of syntax highlighting (though it would be sugar coating here...).
Me too! smiley I’m not sure if an web editor with syntax highlighting exists, but I love it on eclipse, gedit, crimson and other IDEs/editors.

EDIT: oh, they do exist. I wonder if the Helene integration has gone anywhere...

Thanks for the CSS tip. smiley]]>
mandrl Mar 25, 2006, 06:12 AM https://forums.modx.com/thread/24635/a-style-sheet-manager#dis-post-126080
<![CDATA[Re: A Style Sheet Manager]]> https://forums.modx.com/thread/24635/a-style-sheet-manager#dis-post-126079
Where do we buy shares shocked



]]>
Starbuck Mar 14, 2006, 04:59 PM https://forums.modx.com/thread/24635/a-style-sheet-manager#dis-post-126079
<![CDATA[Re: A Style Sheet Manager]]> https://forums.modx.com/thread/24635/a-style-sheet-manager#dis-post-126078
But it’s really an amazing piece of code, yes, with so much flexibility, it’s thought out for designers !

MODx, a designer’s dream ?
Well, not there yet but closer to home than ever grin]]>
davidm Mar 14, 2006, 04:48 PM https://forums.modx.com/thread/24635/a-style-sheet-manager#dis-post-126078
<![CDATA[Re: A Style Sheet Manager]]> https://forums.modx.com/thread/24635/a-style-sheet-manager#dis-post-126077
ModX is so simple . . . and yet so powerful smiley

]]>
sirvanderwaal Mar 14, 2006, 03:49 PM https://forums.modx.com/thread/24635/a-style-sheet-manager#dis-post-126077
<![CDATA[Re: A Style Sheet Manager]]> https://forums.modx.com/thread/24635/a-style-sheet-manager#dis-post-126076
So, now I can just create chunks for those, give them a name and description, and include them in the css page... that’s so cool!]]>
Starbuck Mar 14, 2006, 01:46 PM https://forums.modx.com/thread/24635/a-style-sheet-manager#dis-post-126076
<![CDATA[Re: A Style Sheet Manager]]> https://forums.modx.com/thread/24635/a-style-sheet-manager#dis-post-126075
In the meantime, I have learn to use the "stylesheet as document" method (e.g create a new document with text/css as content-type and _blank as template, then link it this way : <link rel="stylesheet" type="text/css" href="[~id~]" />, with id being of course the id of your css document).

The benefit of this method is that MODx parses your CSS : this means you can use... chunks in your stylesheet, and it’s a very powerful method to build modular css grin

The other benefit is it’s easier to work with your CSS, since you edit them either directly as a document or like me, you edit the css chunks you have created.

I use it ever since !

More detail here :
http://modxcms.com/forums/index.php/topic,2343.0.html
http://modxcms.com/forums/index.php/topic,3068.0.html
http://modxcms.com/forums/index.php/topic,3052.0.html
]]>
davidm Mar 14, 2006, 04:06 AM https://forums.modx.com/thread/24635/a-style-sheet-manager#dis-post-126075