Sometimes you want some ability to tweak your Liferay theme at runtime...
Note: Don't do this when you are packaging a theme for public consumption.
It's very easy to add some "on-line" editability/tweakability to your themes, because we all know that we never get it just right the first time... and finding a bug inevitably happens the moment it goes live and/or you are presenting it to the CEO, and/or the moment you don't have access to the source to do another build...
The solution, for convenience or as a safety net, is simple.
- Create a Journal Template of type CSS, not associated with any Structure. Take note of the URL of the template.
- In the theme file "portal_normal.vm", find the section in the head:
[snip]
<head>
<title>$company_name - $the_title</title>
$theme.include($top_head_include)
#css ($css_main_file)
#js ($js_main_file)
...
[/snip]
Now, using the convenient VM macros available, include a reference to the URL you noted above.
#css ($css_main_file)
#css ("http://...")
It's better to include the reference after the portal's own, because otherwise you can't overrride it's definitions.
That's it!
Now you can access that template and tweak the theme whenever (and wherever) you are... everyone is happy... of course eventually you can migrate permanent changes to a next iteration of the theme.
Hope that helps!

