[opencms-dev] Problems with contenloop

Corsin Camichel cocaman at gmail.com
Mon Jan 2 11:32:31 CET 2006


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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://webmail.opencms.org/pipermail/opencms-dev/attachments/20060102/9b98fc3e/attachment.htm>


More information about the opencms-dev mailing list