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.

Asset Management, templates or external links?

January 23, 2014 4:34pm

Subscribe [2]
  • #1 / Jan 23, 2014 4:34pm

    GErcoli

    1 posts

    Firstly, if this subject has been covered before, I’m sorry, I was unable to find anything via search or google. Secondly, I’m very new to ExpressionEngine, but I have been using CodeIgniter for quite a while now.

    I would like to get some opinions (or suggestions) on what you lovely people think that the best practice or approach to asset (styles,scripts,images,etc) management is when working with EE. As far as I know, I have two ways that I can attach assets to documents/templates, either:
    1.) Create a template that contains styles or javascript, and then use that to embed into other documents.
    2.) Create an /assets dir in the root of the site, and use {base_url}/assets/css/file.css

    Some background on this project may help.. I use grunt & sass/compass to compile and minify both css and javascript. I also use git service to deploy projects to various environments (staging and production for example), and as such, it’s important that these files can be updated and accessed without needing to update the database.

    If anyone has any input on this, it’s very welcome!
    Thank you ahead of time!

  • #2 / Jan 24, 2014 4:05am

    Rob Allen

    3114 posts

    Either way is fine, but the /assets (static files) approach does save some database queries which can be useful on very busy sites.

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

ExpressionEngine News!

#eecms, #events, #releases