[opencms-dev] site-relative vfs paths for different sites
Jordi Martí
jmarti at theinit.com
Fri Mar 28 09:49:10 CET 2008
Mmmh... This is what I would try...
The most straightforward solution would be to change the templates so they
read the data from variables depending on which site the user is in:
(for example, not sure of sintaxis):
<% String mysite=request.getRequestURI();
mysite=mysite.susbtring(0,...) //to get only with "/sites/siteA1/" part
%>
<cms:contentload collector="allInFolderDateReleasedDesc"
param="<%=mySite+"abc/|xmlcontent|1"%>" editable="false">
I thinks there's a more convenient way with macros, but I think this one
should work. (_i think_)
Good luck
JORDI MARTÍ
Email: jmarti AT theinit _dot_ com
Skype ID: jmarti.theinit
PRIVADO Y CONFIDENCIAL
Este mensaje va dirigido a la persona(s) indicada(s). Puede contener
información confidencial de carácter legal o personal de THE INIT SERVICES,
La transmisión errónea del presente mensaje en ningún momento supone
renuncia a su confidencialidad. Si el lector del mensaje no es el
destinatario indicado, o el empleado encargado de su entrega a dicha
persona, por favor, notifíquelo inmediatamente por teléfono y remita el
mensaje original a la dirección de correo electrónico indicada. Cualquier
copia o distribución de esta comunicación queda estrictamente prohibida.
________________________________________
De: opencms-dev-bounces at opencms.org [mailto:opencms-dev-bounces at opencms.org]
En nombre de frankg
Enviado el: jueves, 27 de marzo de 2008 18:43
Para: opencms-dev at opencms.org
Asunto: [opencms-dev] site-relative vfs paths for different sites
Hi,
I'm currently trying to share jsp templates (header, footer, etc) between
different interdependent sites. I currently have a module A1 where i use a
<cms:include> tag to include a header, footer etc in each of the site jsps.
<cms:include property="template" element="header" />
This jsp template code itself calls various resources from the site via a
<cms:contentload>. the urls used here are all the site-relative to A1.
<cms:contentload collector="allInFolderDateReleasedDesc"
param="/sites/mySite/abc/|xmlcontent|1" editable="false">
what im trying to solve is that I have a new module A2 that i am working on
that is dependent on A1. I want to use the same header and footer templates
from A1 in the new module, but i seem to be having problems because the
templates are all site-relative to A1, and when executed in the context of
A2, these paths are not resolveable.
any suggestions on how to resolve this issue? thanks in advance.
Frank
________________________________________
Test your Star IQ Play now!
More information about the opencms-dev
mailing list