[opencms-dev] Re: Displaying properties within <cms:contentload>

Christian Steinert christian_steinert at web.de
Wed Aug 16 10:26:59 CEST 2006


Toni PĂ©rez schrieb:
> On 14/08/06, Christian Steinert <christian_steinert at web.de> wrote:
> [...]
>> Or can I somehow get the name of the current
>> contentload-file into a scriptlet-variable?
> 
> 
> Hello, Christian.
> 
> This is a way you could get the path (relative to the site) of the
> current content loaded:
> 
> <%@taglib prefix="c" uri="http://java.sun.com/jstl/core" %>
> [...]
> <cms:contentload collector = "allInFolderNavPos"
>                 param     = "/faq/faq_${number}.html|xmlpage"
>                 editable  = "true">
>                
>    <c:set var="filename"> <cms:contentshow
> element="${opencms.filename}" /> </c:set>
>    <%
>        String  filename = (String)pageContext.getAttribute( "filename" );
> 
>        out.println( "<p>Filename: [" + filename + "]</p>" );
>    %>
>     
> </cms:contentload>
> 
Dear Toni,

thanks a lot. I will definitely try that out.

I had tried around with c:set of the JSTL, but somehow I had messed up
the getAttribute-part of it.
lot.

> I hope that helps.
it definitely will.

> Regards.
>    Toni.
thanks a lot
christian
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 3269 bytes
Desc: S/MIME Cryptographic Signature
URL: <https://webmail.opencms.org/pipermail/opencms-dev/attachments/20060816/149894ad/attachment.bin>


More information about the opencms-dev mailing list