|
|
|
[
Permlink
| « Hide
]
Andres March - [26/Jan/06 10:45 AM ]
Could you please post an example of your template? Did you look at the shopping cart example? Does it work for you? If so, how is your site different?
The shopping cart doesn't use Velocity decorators. The template I am trying to use for the decorator is something very simple like:
<html><head>#wwhead() <title>$title</title> <head> <body>$body</body></html> Sorry, saw the velocity.properties in the example and just assumed it had one. I'll have a look.
This is a simple issue. We might even just want to change the docs to match the code. You need to prefix your regular sitemesh references in velocity with page. $page is the only thing being put into the context. So use $page.body instead of $body. This goes against convention but is more flexible than putting each page property in the context. We should probably do both, so you could use either $page.body or $body. But for now you have a workaround and not a bad one at that.
well, either the docs or code should be updated to match. I think the site mesh docs say $body etc.., so we should probably expose those things in the context directly. I'm not sure if there is an easier way with the OGNL stack but I was just going to add each of the sitemesh objs to the context. What I don't like is that this needs to be maintained. Or we could just point out in our docs that the sitemesh objs should be referenced like $page.body etc.... What do you think?
I think the latter would be good.
So there will be no need to maintain the code.. Can you takeover this documentation task to sitemesh, so that we can close the issue here? Thanks, Rainer | ||||||||||||||||||||||||||||||||||||||||||||||