[opencms-dev] one content - various presentations

Olli Aro olli_aro at yahoo.co.uk
Wed Jul 19 13:28:23 CEST 2006


Hi Roberto,

 

I don’t have any code for this because have not done this before, but the
principle is this:

 

Main template (the template that you could select as a template for your
pages in CMS):

 

<%

String userAgent=request.getHeader(“User-Agent”);

 

if(userAgent.indexOf(“agent name 1”)>0)

            include here the presentation template for agent name 1.

else if(userAgent.indexOf(“agent name 2”)>0)

            include here the presentation template for agent name 2.

else

            include here the presentation template for your default
presentation.

%>

 

Please note that if all your target browsers are based on the same markup
version e.g. XHTML then you should also be able to achieve this by writing
your CSS properly.

 

Hopefully this makes sense,

 

Olli

   _____  

From: Roberto Hervella Macía [mailto:rhervella at ahorro.com] 
Sent: 19 July 2006 10:42
To: olli_aro at yahoo.co.uk; The OpenCms mailing list
Subject: Re: [opencms-dev] one content - various presentations

 

Hi Olli, I'm not sure what you mean. Could you send me an example?

I'm not sure how to implement a template and then to include the relevant
templates responsible for actual rendering of the content based on the
logic.

 

I don't know whether it is possible to generate various contents from the
same content at the same time (in one action), because in OpenCMS the
content and the presentation is mixed in the same file, a template. Am I
wrong?

 

Does anyone implemented this feature (varios presentations from one unique
content)?

 

Thanks in advance,

 

    Roberto

 

----- Original Message ----- 

From: HYPERLINK "mailto:olli_aro at yahoo.co.uk"Olli Aro 

To: HYPERLINK "mailto:opencms-dev at opencms.org"'The OpenCms mailing list' 

Sent: Tuesday, July 18, 2006 3:16 PM

Subject: RE: [opencms-dev] one content - various presentations

 

How about implementation a main template, which has the logic to switch
between the presentations and then include the relevant templates
responsible for actual rendering of the content based on the logic?

 

Regards,

 

Olli

 


   _____  


From: HYPERLINK
"mailto:opencms-dev-bounces at opencms.org"opencms-dev-bounces at opencms.org
[mailto:opencms-dev-bounces at opencms.org] On Behalf Of Roberto Hervella Macía
Sent: 18 July 2006 12:22
To: The OpenCms mailing list
Subject: [opencms-dev] one content - various presentations

 

Hi everybody!!

 

One functionality we want to use in OpenCms is the possibility to generate
various presentations from one unique content automatically, i.e., I don't
want to implement two different templates and to modified both of them
separately, and finally to publish them.

What I want is to modifiy a unique content and in some way to generate two
or more different presentations, for example one for a web site and another
for a mobile phone.

 

Does anyone know how to use it? Any idea?

 

Thanks in advance,

 

    Roberto

 

--
No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.1.394 / Virus Database: 268.10.1/390 - Release Date: 17/07/2006

 

--
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.1.394 / Virus Database: 268.10.1/390 - Release Date: 17/07/2006


   _____  



_______________________________________________
This mail is sent to you from the opencms-dev mailing list
To change your list options, or to unsubscribe from the list, please visit
http://lists.opencms.org/mailman/listinfo/opencms-dev


--
No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.1.394 / Virus Database: 268.10.1/391 - Release Date: 18/07/2006



-- 
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.1.394 / Virus Database: 268.10.1/391 - Release Date: 18/07/2006
 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://webmail.opencms.org/pipermail/opencms-dev/attachments/20060719/4b669322/attachment.htm>


More information about the opencms-dev mailing list