it's not clear exactly which is your main page that you request from the browser. I use tiles-defs.xml as the repository for all my definitions, and I am no longer familiar with the other method that you are using - in fact I am even unsure whether you are using JavaServer Faces - is that why the files have .jsf endings?
From the start I found the tiles-defs.xml method superior. Have you checked it out?
Also, I'm confused by your use of 'content-type': does that refer simply to a tiles attribute or are you also using it somehow to specify the response header content-type and charset? If so, it's not obvious, and if not, it's probably at best misleading to use the term 'content-type' as a name for a tiles definition.
HTH Adam
On 11/08/2003 04:37 PM Dominik St�ttner wrote:
>I am trying to redesign a site with tiles and want to use several layout-definitions. One for the layout of the whole site and several for the different types of content. Hence, my question: Is it possible to predefine the attributes in only one definition-file that refers to the mainLayout?
As you can see from the enclosed code-snippets I predefine all attributes (including the modul-attributes form the modulLayout) in the mainContnetDef.jsf although I define the content-type attribute(which refers to the modulLayout) in the modul.jsp. Is that possible so? Or do I have to write a extra definition for the modulLayout?
thanks in advance!! dominik
<%-- mainLayout.jsf --%> <%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %> <%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %> <%@ taglib uri="/WEB-INF/tiles.tld" prefix="tiles" %> <html:html> <head> <title><bean:message key="global.title"/></title> <html:base/> </head> <body topmargin="0" leftmargin="0" bgcolor="#FFFFFF"> <table> <tr> <td colspan=2> <tiles:insert attribute="header" /> </td> </tr> <tr> <td> <tiles:insert attribute="menubar"/> </td> <td> <tiles:insert attribute="body-content"/> </td> </tr> <tr> <td colspan=2> <tiles:insert attribute="copyright"/> </td> </tr> </table> </body> </html:html>
<%-- modulLayout.jsf --%> <center> <table> <tr> <td> <tiles:insert attribute="modul1"/> </td> <td> <tiles:insert attribute="modul2"/> </td> </tr> <tr> <td colspan=2> <tiles:insert attribute="modul3"/> </td> </tr> </table> </center>
<%-- mainContentDef.jsf --%> <%@ taglib uri="/WEB-INF/tiles.tld" prefix="tiles" %> <tiles:definition id="defaultContent" page="/layouts/mainLayout.jsp" scope="request"> <tiles:put name="header" value="/common/header.jsf" /> <tiles:put name="menubar" value="/common/menubar.jsf" /> <tiles:put name="copyright" value="/common/copyright.jsf" /> <tiles:put name="modul1" value="/modules/modul1.jsf" /> <tiles:put name="modul2" value="/modules/modul2.jsf" /> <tiles:put name="modul3" value="/modules/modul3.jsf" /> </tiles:definition>
<%-- modules.jsp --%> <%@ taglib uri="/WEB-INF/tiles.tld" prefix="tiles" %> <[EMAIL PROTECTED] file="../common/mainContentDef.jsf" %> <tiles:insert beanName="defaultContent" beanScope="request"> <tiles:put name="content-type" value="../layouts/modulLayout.jsf"/> </tiles:insert>
-- struts 1.1 + tomcat 5.0.12 + java 1.4.2 Linux 2.4.20 RH9
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

