[opencms-dev] Opencms with mobile version - continue
Yves Glodt
yg at mind.lu
Wed Sep 8 10:27:32 CEST 2010
Hi,
I am not sure what you mean exactly... If you want to access the OpenCms
Workplace, as said before, it will not work (well) on a mobile client.
In case you want to create a site with OpenCms, which should have a mobile
template as well, you can use something like this example as a template to
detect and load a template per platform:
<%@ page session="false" %>
<%@ taglib prefix="cms" uri="http://www.opencms.org/taglib/cms" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
<c:choose>
<c:when test="${ fn:contains(header['User-Agent'], 'Android') or
fn:contains(header['User-Agent'], 'iPhone') or
fn:contains(header['User-Agent'], 'iPod') }">
<cms:include page="/templateMobile.jsp" />
</c:when>
<c:otherwise>
<cms:include page="/templateFull.jsp" />
</c:otherwise>
</c:choose>
The real templates are then templateFull.jsp and templateMobile.jsp which
you have to craft to fit your needs.
BR,
Yves
On 8 September 2010 08:13, Nguyen Ha <boboha2001 at yahoo.com> wrote:
> Thank Manfred.
>
> I want to access opencms via a mobile client. But let opencms understand
> which accessing is a mobile client to call the mobile template, what must I
> do?
>
> Regards.
> BBHa
> > ------------------------------
> >
> > Message: 5
> > Date: Mon, 6 Sep 2010 20:34:25 -0700 (PDT)
> > From: Nguyen Ha <boboha2001 at yahoo.com>
> > Subject: [opencms-dev] Opencms with mobile version
> > To: opencms-dev at opencms.org
> > Message-ID: <698525.87748.qm at web36506.mail.mud.yahoo.com>
> > Content-Type: text/plain; charset=us-ascii
> >
> > Hi.
> >
> > Has anybody developed opencms for mobile version?
> > Regards.
> >
> > BBHa
> >
> >
> >
> >
> >
> > ------------------------------
> >
> > Message: 6
> > Date: Tue, 07 Sep 2010 09:08:50 +0200
> > From: Manfred Schenk <manfred.schenk at zerobyte.de>
> > Subject: Re: [opencms-dev] Opencms with mobile version
> > To: opencms-dev at opencms.org
> > Message-ID: <4C85E502.5020907 at zerobyte.de>
> > Content-Type: text/plain; charset=ISO-8859-1
> >
> > Am 07.09.2010 05:34, schrieb Nguyen Ha:
> > > Hi.
> > >
> > > Has anybody developed opencms for mobile version?
> > > Regards.
> > >
> > What do you mean by "mobile version" ?
> > If you want to run opencms on a mobile phone I can't see
> > the rationale
> > behind this since opencms is a server-application.
> > If you want to access opencms via a mobile client, then you
> > can do this
> > already with the current versions.
> > If you want to use the opencms-workplace while using a
> > mobile client,
> > this might be a bit difficult since the workplace is
> > designed for
> > "standard" browsers and may not support mobile browsers.
> >
> > Regards,
> > Manfred
> >
> > --
> > | Manfred Schenk
> > | born between RFC638 and RFC640
> > | PGP-Keys unter
> > |
> > | http://www.ZEROByte.de/pgp/ | WWW: http://www.ZEROByte.de/
> >
> >
> >
> > ------------------------------
>
>
>
>
>
> _______________________________________________
> 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
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://webmail.opencms.org/pipermail/opencms-dev/attachments/20100908/1a181fc9/attachment.htm>
More information about the opencms-dev
mailing list