You can use Xkins to add skins to the website while still using tiles
(http://xkins.sourceforge.net).
You can use XkinsForms tags or create your own taglibs and use xkins to
generate HTML.
You can use css with Xkins, and each skin can have it's own path for
it's css:

For example, if you have this css files in your webapp structure: 
/ROOT/skins/skin1/css/styles.css
/ROOT/skins/skin2/css/styles.css
/ROOT/skins/skin3/css-styles/myStyles.css

And you have this Xkin definition
<xkins>
        <processor
type="ar.com.koalas.xkins.processor.VelocityTemplateProcessor"/>
        <skin name="skin1" url="/skins/skin1">
                <path name="css" url="/css"/>
                <template name="stylesheet">
                        <content><![CDATA[
                                <link rel='STYLESHEET'
href='$res_stylesheet'></link>
                        ]]></content>
                        <element name="stylesheet" path="css"
url="/styles.css"/>
                </template>
        </skin>

        <!-- extends skin1 and only overrides skin url-->
        <skin name="skin2" url="/skins/skin2" extends="skin1"/>

        <!-- extends skin1 and overrides skin url, css-path url and
stylesheet template element url -->
        <skin name="skin3" url="/skins/skin3" extends="skin1">
                <path name="css" url="/css-styles"/>
                <template name="stylesheet">
                        <element name="stylesheet" path="css"
url="/myStyles.css"/>
                </template>
        </skin>
</xkins>

In your JSP you can insert the CSS reference according to the user skin:

<%@ taglib uri="/WEB-INF/tld/xkins.tld" prefix="xkin" %>
<xkin:template name="stylesheet"/>

If user has selected skin2, the following html code will be produced:

<link rel='STYLESHEET' href='/skins/skin2/css/styles.css'></link>

If you use Xkins just for this, you can win in organization of your
urls, files, etc. But you can do the same thing to produce different
tables, frames, buttons, titles, etc.


Cheers.
Guillermo
-----Original Message-----
From: Kunal H. Parikh [mailto:[EMAIL PROTECTED] 
Sent: Martes, 17 de Febrero de 2004 10:18 p.m.
To: 'Struts Users Mailing List'
Subject: Tiles and website skinnability


Hi All!

I am attempting to "tile" my website.

However, I have a need to skin websites based on varied requirements,
wherein, the "layout" of the site remains the same, with the exception
of the graphics.

What I additionally need to do, is call a different style sheet based on
the URL.

Can someone throw some light in this area ?


TIA,

Kunal


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

NOTA DE CONFIDENCIALIDAD
Este mensaje (y sus anexos) es confidencial, esta dirigido exclusivamente a las 
personas direccionadas en el mail y puede contener informacion (i)de propiedad 
exclusiva de Interbanking S.A. o (ii) amparada por el secreto profesional. Cualquier 
opinion en el contenido, es exclusiva de su autor y no representa necesariamente la 
opinion de Interbanking S.A. El acceso no autorizado, uso, reproduccion, o divulgacion 
esta prohibido. Interbanking S.A no asumira responsabilidad ni obligacion legal alguna 
por cualquier informacion incorrecta o alterada contenida en este mensaje. Si usted ha 
recibido este mensaje por error, le rogamos tenga la amabilidad de destruirlo 
inmediatamente junto con todas las copias del mismo, notificando al remitente. No 
debera utilizar, revelar, distribuir, imprimir o copiar este mensaje ni ninguna de sus 
partes si usted no es el destinatario. Muchas gracias.



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to