2007/12/18, maitri <[EMAIL PROTECTED]>: > > > Is there a way to insert a css > stylesheet depending of a role??? > I cant find out how can I put a stylesheet with a tag like (put, > insert..etc.. I mean, a tag in tile that has the role attribute) > thanks in advance... >
You have various options, all based upon the "role" attribute in XML and JSP tags. For example you could have: <definition name="myHomePage" layout="/my/layout.jsp"> <put-attribute name="css_role1" value="/css/role1.css" role="role1" /> <put-attribute name="css_role2" value="/css/role1.css" role="role2" /> </definition> And in your layout.jsp: <head> <link rel="stylesheet" type="text/css" href="<tiles:getAsString name='css_role1' /><tiles:getAsString name='css_role2' />"> </head> Another option is to have HTML fragments containing only the <link> tag, one for each role. HTH Antonio
