[opencms-dev] Problems with contenloop

Siegfried Puchbauer siegfried.puchbauer at gmail.com
Mon Jan 2 12:59:00 CET 2006


another way, how i did it:

first download the datetime taglib from jakarta:
http://jakarta.apache.org/taglibs/doc/datetime-doc/intro.html
and install it (copy jar and tld file and make entry in your web.xml,
instructions are in the documentation)

define in your jsp:
<%@ taglib uri="http://jakarta.apache.org/taglibs/datetime-1.0" prefix="dt"
%>

and format your date:
<dt:format pattern="dd.MM.yyyy"><cms:contentshow
element="DateField"/></dt:format>

hth

2006/1/2, Corsin Camichel <cocaman at gmail.com>:
>
> Hi Patricia
>
> This is how I did it:
>
> <%
> String dateFormatter = "E dd.MM.yyyy";
> %>
> <c:set var="dateInMs"><cms:contentshow element="EventDate" /></c:set>
> <%
> java.util.Date tmp = new java.util.Date(Long.parseLong(
> pageContext.getAttribute("dateInMs").toString().toUpperCase()));
> Format formatter = new SimpleDateFormat(dateFormatter,
> cms.getRequestContext ().getLocale());
> out.println(formatter.format(tmp).toString().toUpperCase());
> %>
>
> This shows "MON 02. Jan. 2005", depending on your current locale.
>
> Hope this helps
>
> Regards
> Corsin
>
> On 1/2/06, Patricia Ferre Zudaire <pferre at sgi.es> wrote:
>
> > Hello and happy new year :-)
> >
> >    I have problems with contentloop. My code is:
> >
> > <cms:contentloop element="Appointment">
> > <cms:contentcheck ifexists="Address">
> >     <div class="fondo014">
> >  <div class="txt1negrotam10">
> >    <strong>Lugar: </strong><cms:contentshow element="Address" />
> >  </div>
> >     </div>
> >     <br>
> > </cms:contentcheck>
> > <cms:contentcheck ifexists="DateConv">
> >     <div class="fondo014">
> >  <div class="txt1negrotam10">
> >    <strong>Lugar: </strong><cms:contentshow element="DateConv" />
> >  </div>
> >     </div>
> >     <br>
> > </cms:contentcheck>
> > <!-- Fin Convocatoria -->
> > </cms:contentloop>
> >
> > My problem is that I want to format DateConv, but I don't know how. Can
> > anybody help me?
> >
> > Thanks and best regards,
> >
> >
> >
> >   Patricia
> >
> > ------------------------------
> > Este mensaje, y en su caso, cualquier fichero anexo al mismo, puede
> > contener información clasificada por su emisor como confidencial en el marco
> > de su Sistema de Gestión de Seguridad de la Información siendo para uso
> > exclusivo del destinatario, quedando prohibida su divulgación copia o
> > distribución a terceros sin la autorización expresa del remitente. Si Vd. ha
> > recibido este mensaje erróneamente, se ruega lo notifique al remitente y
> > proceda a su borrado. Gracias por su colaboración.
> > ------------------------------
> > This message including any attachments may contain confidential
> > information, according to our Information Security Management System, and
> > intended solely for a specific individual to whom they are addressed. Any
> > unauthorised copy, disclosure or distribution of this message is strictly
> > forbidden. If you have received this transmission in error, please notify
> > the sender immediately and delete it.
> > ------------------------------
> >
> >
> >
> > _______________________________________________
> > 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
> >
> >
>
>
> --
> Corsin Camichel
> cocaman at gmail.com
>
> _______________________________________________
> 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
>
>


--
Mit freundlichen Grüßen

Siegfried Puchbauer
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://webmail.opencms.org/pipermail/opencms-dev/attachments/20060102/92529324/attachment.htm>


More information about the opencms-dev mailing list