[opencms-dev] relate site to template/module

Alexander Kandzior alex at opencms.org
Tue Oct 26 10:27:23 CEST 2004


Are you using OpenCms 6.0 a 1? I assume so since multiple site support was
added in 6.0.

See in file "org.opencms.workplace.explorer":

public static TreeMap getTemplates(CmsObject cms) throws CmsException ...

This contains the current logic to collect all the templates from a
subfolder in the modules folder. Since you have the CmsObject available, it
should be fairly easy to have some additional logic that restricts the
available templates. I recommed using special properties at the template to
restrict it to certain sites, maybe using a regular expression with the site
directory.

Best Regards,
Alex.

Alexander Kandzior
Alkacon Software - The OpenCms Experts
http://www.alkacon.com

 

> -----Original Message-----
> From: opencms-dev-bounces at opencms.org 
> [mailto:opencms-dev-bounces at opencms.org] On Behalf Of Hans 
> van der Linden
> Sent: Tuesday, October 26, 2004 9:28 AM
> To: The OpenCms mailing list
> Subject: [opencms-dev] relate site to template/module
> 
> Hi
> 
> I ran into a litle problem. I now have 20 websites running. 
> The problem now is keeping some structured overview in my 
> templates. I have 3 templates per website so when I add a new 
> page I get a combo of 60 possible templates. What I am 
> thinking of is to relate the template (module) to a 
> website... So when I have selected "website A" I will only 
> see the templates of "website A"... Any suggestions on how to 
> do this ???? Maybe some directions in where to change this in 
> the source???
> 
> regards
> 
> Hans
> 
> 
> 
> 
> _______________________________________________
> This mail is send to you from the opencms-dev mailing list To 
> change your list options, or to unsubscribe from the list, 
> please visit http://mail.opencms.org/mailman/listinfo/opencms-dev
> 
> 




More information about the opencms-dev mailing list