Sitemesh : set property from decorated page for decorator

Z

Zaza

Hi,

I'm using sitemesh.

I have a main.jsp for the main template, to add header and footer to
each page.

In header.jsp, I need an information (the "theme" of the page) that
must be provided by each decorated page. I don't find how to set, in
each decorated page, a "theme" property, that I can retrieve in
main.jsp (for exemple with "${thePage.theme}") avec give this property
to header.jsp.

I have searched, something arround this line in main.jsp :

<decorator:usePage id="thePage" />
<page:applyDecorator name="include" page="decorations/Header.html?
theme=${thePage.theme}" />

but I have this error :

The class 'com.opensymphony.module.sitemesh.parser.TokenizedHTMLPage'
does not have the property 'theme'.

and I don't find how to set "theme" property in each decorated page.

Any idea ?

Thanks,

Xavier
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,438
Messages
2,571,699
Members
48,796
Latest member
Greg L.
Top