ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

Benefits of storing CSS files in a EE template?

March 04, 2010 1:50pm

Subscribe [4]
  • #1 / Mar 04, 2010 1:50pm

    Deeper

    215 posts

    Why would you put it in a template as oppose to elsewhere on the server so you can maintain it with your existing CSS editor?

  • #2 / Mar 04, 2010 3:13pm

    Nevin Lyne

    370 posts

    1) If you are not already using a version control system, then you could easily look at/roll back to an earlier version of your CSS. 

    2) Use of EE conditionals or other tags to change or manipulate your CSS (not sure how often people do it, but likely some do)

    Just a couple of thoughts 😊

  • #3 / Mar 04, 2010 3:27pm

    Deeper

    215 posts

    Cool.

    Is there a way to link CSS EE templates to external editors?

  • #4 / Mar 05, 2010 7:20am

    Michael Rog

    179 posts

    All EE templates (CSS templates included) can be accessed via external editors once they are saved as files:

    http://expressionengine.com/public_beta/docs/templates/flat_file_templates.html

    Specifically, CSS templates have the .css extension, so CSS-aware editors will recognize the syntax.

  • #5 / Mar 05, 2010 8:02pm

    grrramps

    2219 posts

    Why would you put it in a template as oppose to elsewhere on the server so you can maintain it with your existing CSS editor?

    Yeah, this is really a warm and fuzzy workflow issue.

    Using EE’s templates you can dump them to static files and edit using FTP and any one of a number of CSS editors. I’ve done it both ways. #1 - Hand coded in EE (a few more errors. #2 -Editor and copy and paste into EE (my preferred method) and, #3 - Editor and FTP.

    I prefer #2 because #3 doesn’t really save any time or steps, and #2 has EE’s built in versioning. As to performance between static CSS file vs. template CSS file, there might be some improvement with static files, but it’s nominal.

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases