[opencms-dev] coding question param.value vs. cms.element.settings['']

Filip Kratochvil filip.kratochvil at nelasoft.cz
Mon May 2 14:33:44 CEST 2016

Hi Chris,


i hink it’s better to use your second example:





1.       define settings in xmlcontent’s formatter config

2.       read settings value



How request parameters works?


You can read param value from URL query string, example:


${param.key} = value


You can send param value to JSP using dynamic function:



You can send param value to JSP using JSP include, example starts at line 102:



S pozdravem / Kind regards
Filip Kratochvil
NELASOFT Technologies, s.r.o.
E-mail:  <mailto:filip.kratochvil at nelasoft.cz> filip.kratochvil at nelasoft.cz
Web:  <http://www.nelasoft.cz/> www.nelasoft.cz

Twitter:  <https://twitter.com/NELASOFT> @NELASOFT


From: opencms-dev-bounces at opencms.org [mailto:opencms-dev-bounces at opencms.org] On Behalf Of Christoph Kukulies
Sent: Monday, May 2, 2016 12:21 PM
To: The OpenCms mailing list
Subject: [opencms-dev] coding question param.value vs. cms.element.settings['']


 I have the following code in a formatter:


          <c:set var="showdate"><c:out value="${param.showDate}" default="true" /></c:set>
              <c:if test="${showdate}">
                  <p><i><fmt:formatDate value="${cms:convertDate(content.value.ProjektDatum)}" dateStyle="LONG"  type="date" /></i></p>


     <c:if test="${cms.element.settings['enable_untertitel']}">
        <h3 class="post-title" ${content.rdfa.Title}>

Actually, what I want to achieve is to make the output of the date dependent on the widget setting "showDate".

But just for the understanding: where is param.showDate wired resp. how does it function?

Chris Christoph P. U. Kukulies kukulies (at) rwth-aachen.de 


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://webmail.opencms.org/pipermail/opencms-dev/attachments/20160502/bb0c6568/attachment.htm>

More information about the opencms-dev mailing list