views:

36

answers:

1

It would be nice to be able to refer to a set "static" folder as a variable instead of having to keep track of a specific URL that might need to be changed if static media gets moved to a CDN later on.

For example, this:

<script src="{static_media}/js/jquery-1.4.min.js"></script>

Instead of this:

<script src="/static/js/jquery-1.4.min.js"></script>
+1  A: 

You can just go into the "Template" section of the backend to create a global variable for any other strings you'd like to create a global variable for.

See here: http://expressionengine.com/docs/templates/globals/user_defined.html

Ryan
That's exactly what I ended up doing!I even named it `{media_url}` as a nod to Django.
Trey Piepmeier