On Mon, Jan 19, 2009 at 3:30 PM, Emmanouil Batsis (Manos)
<[email protected]> wrote:
> 1) I can't figure out a way to share velocity templates between themes.
> Sorry if this is a really dumb question but velocity is so new to me I'm not
> even sure whether this is a roller or a velocity question.
That is by design. Themes are independent and encapsulated. We do not
provide any way to share templates between themes.
We do provide a way for you to add Velocity macros to Roller and you
can then use those in all themes. Just add a new file called
WEB-INF/velocity/roller-custom.vm and put your macros in there.
> 2) $url.themeResource does not work for me. Suppose a theme named "themeA"
> applied to a blog named "blogA", it loads it's CSS like:
>
> $url.resource("styles/default.css")
>
> which results in
>
> /contextPath/blogA/resource/styles/default.css
That is also by design.
Once you have chosen to customize a theme, the theme's templates are
copied into your weblog (in the database) and the theme's resources
are copied into your weblog's resources area. We do that so that, once
you (as an end-user of Roller) have customized a theme you are truly
on your own -- changes made to the original theme you copied will not
effect you (that old theme could even be deleted from the system but
you'll still be OK).
Because of that the $url.resource() method behaves differently in a
blog with a custom vs. a shared theme.
Hope that helps,
- Dave