It is a good idea...

The code can be something like this: 

http://www.mysite.com/page.theme1.jsp
http://www.mysite.com/page.theme2.jsp


--- jsp ---
<[EMAIL PROTECTED] import="info.magnolia.cms.util.Resource"%>

<%
String themeSelector = Resource.getSelector();  // themeSelector will be = 
"theme1" or "theme2" 
%>

Now you can reference for instance a completely different css, using 
themeSelector as folder name of your css resources...so that you can realize a 
"skin".

Otherwise, with simple if statements you can drive the content you want...


Hope it helps..

Matteo




-----Original Message-----
From: [email protected] [mailto:[EMAIL PROTECTED] 
Sent: giovedì, 7. agosto 2008 15:06
To: [email protected]
Subject: Re: [magnolia-user] How to display 2 themed sites from one content tree

I remember vaguely having used once a methode where you ad a  
discriminator between the filename and the file extension.

http://www.magnolia.info/home.html
http://www.magnolia.info/home.foo.html
http://www.magnolia.info/home.bar.html

result in the same page. But you can catch the discriminator (in this  
case "test") and act upon it. Both pages will get cached propperly if  
I remember correctly. Unfortunately I don't have the code by hand  
right now. But I hope this gives you an idea.

Cheers,
Will

On 07.08.2008, at 14:48, Jon Barber wrote:

> Hi,
>
> I'd like to use Magnolia to serve one web site with 2 themes using
> magnolia. The themes will consist of different content for the top and
> right hand bar, but the site structure will be exactly the same, and  
> the
> content for the main panel will be identical. I need to make use of  
> the
> caching capability of magnolia, and new pages need to be added to
> certain sections. I'd like to have just the one site structure within
> the website view.
>
> What's the best way to do this so that adding new content will be
> visible on both themes as painlessly as possible ? I'm very  
> comfortable
> with JSP scripting and writing Java code, but I'd like to avoid doing
> custom work if need be.
>
> My current thinking is to use a scheme similar the I18n support using
> URL prefixing. So for example, say the two themes are foo and bar, the
> URLs would be http://somewhere.com/foo/index.html and
> http://somewhere.com/bar/index.html. I'd write a filter to extract the
> prefix and place it in the request context so that the page knows  
> which
> theme to use. This would mean some custom work though.
>
> It looks like virtual URIs might be able to help, or maybe even
> sub-templates ?
>
> Any help much appreciated.
>
> Thanks,
>
> Jon.
>
> ----------------------------------------------------------------
> for list details see
> http://documentation.magnolia.info/
> ----------------------------------------------------------------


----------------------------------------------------------------
for list details see
http://documentation.magnolia.info/
----------------------------------------------------------------

----------------------------------------------------------------
for list details see
http://documentation.magnolia.info/
----------------------------------------------------------------

Reply via email to