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.

What are the benefits of using an EE template for css?

January 26, 2010 6:31am

Subscribe [3]
  • #1 / Jan 26, 2010 6:31am

    Rick Lecoat

    128 posts

    This is maybe a really dumb question, but can somebody explain to me the benefits of using a css template in EE as opposed to simply linking an external stylesheet the ‘regular’ way? I’ve been trying to see a benefit to it but I can’t. I’m sure I’m missing something obvious, so could somebody please enlighten me?

    Thanks!

  • #2 / Jan 26, 2010 7:24am

    Focus Lab Dev Team

    1129 posts

    Many people don’t use the EE templates for CSS since it actually requires PHP to load (via the EE template parser)

    As far as I see it there are only 2 benefits to consider. When using it as an EE template you can include EE tags so you can have “dynamic” styles determined somewhere in the database which certainly has it’s place on certain sites. I’ve only done this once in the past and I created a separate stylesheet just for the dynamic styles and imported it into my flat file “main” stylesheet.

    The second benefit is that when using the stylesheet tag EE will automatically add a cache buster with the edit date of the template

  • #3 / Jan 26, 2010 12:17pm

    Lisa Wess

    20502 posts

    Another advantage is that it’s available for editing in the CP.

    So now all the web devs are groaning, “You edit things in the CP?!” - this can actually come in very handy if you need to make a template update from say, a public library, and have only a web browser to use.  If you travel without your own gear, that could be very handy indeed.

  • #4 / Jan 26, 2010 12:45pm

    Ingmar

    29245 posts

    When using it as an EE template you can include EE tags so you can have “dynamic” styles determined somewhere in the database which certainly has it’s place on certain sites.

    Actually, that’ll only work if you don’t use the {stylesheet=} tag. Using that tag, EE won’t parse regular tags, but it’ll be more light weight.

    The real advantage, in my book (as Lisa points out) is the ability to edit via the control panel. No need for FTP, or even your own laptop, any web browser will do.

  • #5 / Jan 26, 2010 4:31pm

    Focus Lab Dev Team

    1129 posts

    The real advantage, in my book (as Lisa points out) is the ability to edit via the control panel. No need for FTP, or even your own laptop, any web browser will do.

    I suppose it depends on perspective. To me that gives no advantage as I never edit templates from the control panel. It all depends on your tools, your workflow, and your role in the website in question 😊

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

ExpressionEngine News!

#eecms, #events, #releases