Page 1 of 1

Okay to hardcode link to stylesheet in template?

Posted: Mon Nov 01, 2010 9:18 pm
by Cerulean
This might be a silly question, but what is the advantage in pasting in my CSS at Layout > Stylesheets and then calling it in the template with {cms_stylesheet}?

It seems easier to just leave the hardcoded links to the stylesheets in my template.

Will a template function okay with hardcoded stylesheet links?

Re: Okay to hardcode link to stylesheet in template?

Posted: Mon Nov 01, 2010 9:38 pm
by uniqu3
If you prefer to upload your stylesheet to a folder and hardcode it in the template thats fine at will work.
Downside of this is that you need to download the stylesheet each time you want to do a minor change and reupload again, with {cms_stylesheet} it is also being cached.

Re: Okay to hardcode link to stylesheet in template?

Posted: Mon Nov 01, 2010 9:49 pm
by faglork
uniqu3 wrote: Downside of this is that you need to download the stylesheet each time you want to do a minor change and reupload again, with {cms_stylesheet} it is also being cached.
UPSIDE is you can work with the web developer extension for Firefox, where you can "live edit" your style sheets, and you can work much faster because you see the changes in realtime ...

Cheers,
Alex

Re: Okay to hardcode link to stylesheet in template?

Posted: Mon Nov 01, 2010 10:26 pm
by uniqu3
faglork wrote:
uniqu3 wrote: Downside of this is that you need to download the stylesheet each time you want to do a minor change and reupload again, with {cms_stylesheet} it is also being cached.
UPSIDE is you can work with the web developer extension for Firefox, where you can "live edit" your style sheets, and you can work much faster because you see the changes in realtime ...

Cheers,
Alex
Indeed but those 5 seconds are not worth it when I loose the smarty power in stylesheets and with thisĀ  controlls like colors, width and other options that can be used with smarty in css.

Re: Okay to hardcode link to stylesheet in template?

Posted: Mon Nov 01, 2010 11:27 pm
by Dr.CSS
@faglork

Firefox Web Dev. don't care where the style sheets come from it will still work with them...

Re: Okay to hardcode link to stylesheet in template?

Posted: Tue Nov 02, 2010 8:48 am
by faglork
Dr.CSS wrote: @faglork

Firefox Web Dev. don't care where the style sheets come from it will still work with them...
Of course ...

but only with an external style sheet you can just press "save", change to a tab running fireftp, load up the css file, and you are done. This is much faster than opening the stylesheet(s) in the editor and then transfering all the changes to the respective stylesheet.

Cheers,
Alex

Re: Okay to hardcode link to stylesheet in template?

Posted: Tue Nov 02, 2010 1:46 pm
by RonnyK
Well, there is one thing... module... TemplateExternalizer...

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

That way you can edit realtime and store. It will be included inside the DB by the module.

Ronny

Re: Okay to hardcode link to stylesheet in template?

Posted: Fri Nov 05, 2010 1:50 pm
by Fraserm
I'm surprised nobody has yet mentioned the time it would take to update a multiple template website...

If you're using {cms_stylesheet} you can use as many stylsheets as you want, edit them easily, add more easily and you never have to go anywhere near your templates.

If you hard code them into your templates and you want to add a new stylsheet you have to go through and update every template you're using. It's an unecessary job, even if your site is only using a few.