I'm on my phone so I only skimmed your message. If I read correctly,
you should take a look at sitemesh.

-W

On 7/17/09, Pascal <pas...@voidmage.net> wrote:
> Hello list,
>
> in Struts2 it is possible to do something like
>
> <html>
> <body>
>   <s:myMainNavigationMenu />
>
>   <h1>A page</h1>
>   <p>Some content</p>
> </body>
> </html>
>
> This works ok, but my problem is that I have to change every single
> page, if i would like to have a custom footer for every page, for example.
>
> Now my question is: Is it possible to do something like this?
>
> <s:useTemplate name="myCommonTemplate">
>     <s:setTemplateTag name="body">
>         <h1>A page</h1>
>         <p>Some content</p>
>     </s:setTemplateTag>
> </s:useTemplate>
>
> And as template definition say
>
> <!-- Main menu -->
> <table>...</table>
>
> <s:insertTemplateTag name="body" />
>
> <!-- Footer -->
> <p>This is the footer</p>
>
> I know it is possible to use parameters for templates, but they
> obviously have huge limitations as I can't just put the tags there as I
> did in my example.
>
> Also, I could do something like
>
> <s:myMainTemplate>
> <s:param name="bodyPage" value="page1.jsp" />
> </s:myMainTemplate>
>
> which I also don't want because I would have an extra (unnecessary) page.
>
> So, is it possible to pass whole XML-Structures to templates? Maybe you
> have some reasons why I shouldn't want what I'm suggesting here, I would
> be eager to hear them! :-)
>
> Pascal
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
> For additional commands, e-mail: user-h...@struts.apache.org
>
>


-- 
Wes Wannemacher
Author - Struts 2 In Practice
Includes coverage of Struts 2.1, Spring, JPA, JQuery, Sitemesh and more
http://www.manning.com/wannemacher

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org

Reply via email to