Page 1 of 1

CSS sheets in CMSMS 2.0

Posted: Thu Mar 29, 2007 3:01 am
by biffs
I'm not sure if this has been brought up before, but I was wondering if the stylesheets in 2.0 will be moved out of the database and into static files editable backend.

I really hate having css in the database, mainly because I can't edit it in Dreamweaver.  I have to make changes, click apply, etc..... really not cool.

Is there a module that does this job for 1.0? 

Re: CSS sheets in CMSMS 2.0

Posted: Thu Mar 29, 2007 4:51 am
by cyberman
biffs wrote: Is there a module that does this job for 1.0? 
Have you tried template externalizer?

http://dev.cmsmadesimple.org/projects/externalizer/

Re: CSS sheets in CMSMS 2.0

Posted: Thu Mar 29, 2007 7:13 am
by KO
You can remove you stylesheet with your current version if you want to do that. Just use normal stylesheet calls in you template and not {stylesheet} tag. Like:

Code: Select all

<link rel="stylesheet" type="text/css" href="http://yourdomain/yourstyle.css">
in head section. simple.

Re: CSS sheets in CMSMS 2.0

Posted: Thu Mar 29, 2007 8:19 am
by kermit
KO wrote: You can remove you stylesheet with your current version if you want to do that. Just use normal stylesheet calls in you template and not {stylesheet} tag. Like:

Code: Select all

<link rel="stylesheet" type="text/css" href="http://yourdomain/yourstyle.css">
in head section. simple.
i've been doing this all along for my own sites (speeds up cmsms page generation, and allows for browser caching of css), the downside is losing the convenience of the css editing on the back-end..  which is pretty handy for a quick fix.... and having pretty much everything IN the database makes it easier for backups, server migrations, etc... 

a simple text editor function in the back-end file manager would probably be sufficient to replace the back-end css editing capability.

biffs..  lately, i've just been using the web developer toolbar's "edit css" function and copying changes made (and already tested 'live') into a local copy of the external file.. which is then uploaded via ftp (sometimes run through csstidy first). since dreamweaver's rendering isn't always perfect, and once a template is "done" i rarely fire up dreamweaver to edit it, this is the best thing i've come up with so far for css editing.

Re: CSS sheets in CMSMS 2.0

Posted: Thu Mar 29, 2007 10:07 am
by RonnyK
Externalizer in combination with Cache, gives you the advantage that all data is stored in DB, maintable through 'externalizer' and speed is taken care of with the tag 'Cache'. All you have to do is install the function and replace the calling of {stylesheet} to {cstylesheet} and {content} with {ccontent}

http://dev.cmsmadesimple.org/projects/cache

Ronny

Re: CSS sheets in CMSMS 2.0

Posted: Thu Mar 29, 2007 12:14 pm
by KO
I do the same as kermit. Firefox + webdeveloper combination + few other other handy css tools for seeing css behaviour. Edit local file when i'm happy and then FTP it down to server. Then checking out with IE to verify. If you want to include user styles in page editor like FCK you have to copy those styles to stylesheet that is attached to that template. Still you do not need to use {stylesheet} tag.

But ofcourse this {stylesheet} is nice as well and it has it's benefits.

Keijo

Re: CSS sheets in CMSMS 2.0

Posted: Fri Mar 30, 2007 7:29 pm
by Vin
Nice uses, but the original question got lost... how will be css andled in the v2.0?

Re: CSS sheets in CMSMS 2.0

Posted: Fri Mar 30, 2007 7:47 pm
by alby
KO wrote: ........
If you want to include user styles in page editor like FCK you have to copy those styles to stylesheet that is attached to that template. Still you do not need to use {stylesheet} tag.
........
Is there a similar method for TinyMCE?

Alby

Re: CSS sheets in CMSMS 2.0

Posted: Fri Mar 30, 2007 10:26 pm
by biffs
Vin wrote: Nice uses, but the original question got lost... how will be css andled in the v2.0?
thank you!  Yes, I was wondering if external stylesheets would be included in 2.0 opposed to the database.  I really can't think of one justifiable reason to have the {stylesheet} tag that cannot be done using external sheets.  In fact, the {stylesheet} tag could be used the same way in 2.0, but instead of grabbing all the css info from the database and creating the css file, it just loads the appropriate pre-made css files.  (ie, one for print, menu, news, layout, etc)

Stylesheets can easily be modified in the backend using a simple php file editor (quickxplore among others).  In fact, I've integrated FileManager (http://www.gerd-tentler.de/tools/filemanager/) into the admin section just for this purpose.

Anyways, is there a change going to happen in 2.0?

Re: CSS sheets in CMSMS 2.0

Posted: Fri Mar 30, 2007 10:59 pm
by biffs
cyberman wrote:
biffs wrote: Is there a module that does this job for 1.0? 
Have you tried template externalizer?

http://dev.cmsmadesimple.org/projects/externalizer/
Not what I'm looking for.
This module allows you to use any text editor to edit CMS templates and stylesheets. It exports them to temporary files on the server and watches these files for modifications which are automatically imported into the database and take immediate effect.
I dont want them stored in the database at all.

And all you others commenting about the web developer tool bar for FF - I know, I love that thing.  It does so much and I love the live edit CSS feature.

Re: CSS sheets in CMSMS 2.0

Posted: Sat Mar 31, 2007 5:14 pm
by Vin
Kermit has already asked this question in Tips and Tricks » Speed up your site.. lose {stylesheet} topic (http://forum.cmsmadesimple.org/index.php/topic,10630.0.html), but I'm not sure whether Ted read it or whether he sent a PM to him...

Re: CSS sheets in CMSMS 2.0

Posted: Sun Apr 01, 2007 12:22 am
by biffs
Vin wrote: Kermit has already asked this question in Tips and Tricks » Speed up your site.. lose {stylesheet} topic (http://forum.cmsmadesimple.org/index.php/topic,10630.0.html), but I'm not sure whether Ted read it or whether he sent a PM to him...
Thanks for pointing that out.