I'm already doing this in most of my definitions: <put name="titleKey" value="activities.title"/>
<%-- Push tiles attributes in page context --%> <tiles:importAttribute scope="request"/> <title><bean:message name="titleKey"/></title> But if you read my message closely - you'd see that I don't have a definition, and I don't have an action defined for these velocity template pages. In fact, my app really knows nothing about them - the URL indicates that a template should be rendered. The *only* thing in my app that knows these templates exists is the URL - which will eventually be configured in the menu for the app. To include a static template in a tile, I'm doing: <putList name="sections"> <add value="/WEB-INF/pages/weather.jsp"/> <add value="/do/static?template=indexAds"/> </putList> Where the second one is a static template (there's a ForwardAction for /static) and it takes a parameter of "/WEB-INF/pages/static.jsp" where static.jsp only has: <%@ include file="/common/taglibs.jsp"%> <rq:content page="<%=request.getParameter("template")%>"/> Thanks, Matt -----Original Message----- From: Holman, Cal [mailto:[EMAIL PROTECTED] Sent: Thursday, September 25, 2003 8:40 AM To: Struts Users Mailing List Subject: RE: Setting the page title from a tile I do something a little different to pull the title out of application.properties <definition name="whatsnew.pagedef" extends="home.pagedef"> <put name="title" value="whatsnew.title" /> <put name="content" value="/web/pages/home/WhatsNew.jsp" /> <put name="keywords" value="whatsnew.keywords"/> <put name="crumbtitle2" value="What's New"/> <put name="crumblink2" value="/home/WhatsNew"/> <put name="pagename" value="WhatsNew"/> <put name="defname" value="whatsnew.pagedef"/> </definition> in template <tiles:importAttribute name="title"/> <title><bean:message name="title" scope="page"/></title> Additionally to pass the tile name for menus to use I define a bean in the definition name to the request <tiles:useAttribute id="defname" name="defname" scope="request"/> Cal http://www.calandva.com/ Last update 08/01/03 -----Original Message----- From: Srinivas Gunturu [mailto:[EMAIL PROTECTED] Sent: Thursday, September 25, 2003 09:56 To: [EMAIL PROTECTED] Subject: Re: Setting the page title from a tile Matt, We have solved this in our application by defining our tile as follows <definition name="baseDef" path="/Template.jsp"> <put name="title" value="My Title1" /> <put name="header" value="/header.jsp"/> <put name="topnav" value="/topnav.jsp"/> <put name="leftnav" value="/navigation.jsp"/> <put name="footer" value="/footer.jsp"/> <put name="body" value=""/body.jsp> </definition> In Template.jsp, you can access title using <tiles.getAsString> <TITLE><tiles:getAsString name="title"/></TITLE> Hope this helps. >>> [EMAIL PROTECTED] 09/25/03 08:51AM >>> I have an interesting problem that I can't figure out how to solve. We are using Tiles, as well as a custom tag library that renders content from Velocity Templates. These templates have HTML content in them, but they're mostly text - and this is our CMS (for now). The problem is is that we've developed our app in a way only our menu needs to know about the templates. So /appName/static/template will show the template page (wrapped in Tiles). The problem is, by the time I load the Tile, with the template, the page's title has already been set. Sure I could use JavaScript and set document.title in the Velocity template, but that does no good for search engine optimization. Another solution I thought of is to put the title into the URL in my menus, i.e. /appName/static/homeownerServices?title=Homeowner%20Services - but that's just plain ol' ugly to send as a URL (via e-mail and such). Two other solutions I can think of: 1. Create a action-mapping and tile for each template (i.e. /appName/homeownerServices), and define the title in there. 2. Parse the template name and convert it to readable titles. This would require that I name all my templates so they have an appropriate title, but it just might work. In this example, /homeownerServices gets translated to Homeowner Services as a title. I guess I'll go with #2 (see how simply posting these messages actually helps to solve things!), but I wanted to see if anyone else had any good suggestions/practices. Thanks, Matt --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] Learn more about Paymentech's payment processing services at www.paymentech.com THIS MESSAGE IS CONFIDENTIAL. This e-mail message and any attachments are proprietary and confidential information intended only for the use of the recipient(s) named above. If you are not the intended recipient, you may not print, distribute, or copy this message or any attachments. If you have received this communication in error, please notify the sender by return e-mail and delete this message and any attachments from your computer. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]