[opencms-dev] How to list files from a folder in opencms?

Patric Dosch patric.dosch at virtual-identity.com
Wed Mar 8 15:00:10 CET 2017


>> I don't know how to read data from the resource type(xml), which I can access using el expression.
This should help: http://documentation.opencms.org/opencms-documentation/content-in-opencms/formatters-and-their-configuration/index.html#4.2

So ${value.YourFieldName} holds the information

Regards, Patric


Von: opencms-dev-bounces at opencms.org [mailto:opencms-dev-bounces at opencms.org] Im Auftrag von mihai lacusteanu
Gesendet: Dienstag, 7. März 2017 16:49
An: opencms-dev at opencms.org
Betreff: [opencms-dev] How to list files from a folder in opencms?

I need to create a new resource type in opencms which have 1 field. The field is for a target folder.
Every time I select a folder from VFS and save the resource(xml) the formatter will render a the list of files from the specified folder.

I managed to create a jsp file which will create the list of files needed, but only with the target folder hardcoded. I don't know how to read data from the resource type(xml), which I can access using el expression.
Can you help me?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://webmail.opencms.org/pipermail/opencms-dev/attachments/20170308/6a9a1a31/attachment.htm>


More information about the opencms-dev mailing list