[opencms-dev] Replace <cms: contentload> to <cms: formatter>

Filip Kratochvil filip.kratochvil at nelasoft.cz
Thu Sep 10 14:44:03 CEST 2015


Hi Ricardo,

 

you should use <cms: formatter> tag only in formatters. This tag loads data from xmlcontent, that is actually requested (or that is actually rendered by this formatter).

 

Take a look:

https://github.com/alkacon/modules-v8/blob/branch_9_5_x/modules/com.alkacon.bootstrap.formatters/resources/system/modules/com.alkacon.bootstrap.formatters/formatters/blog.jsp

 

On other places, you can use <cms:contentload> us usual.

 

But i recommend change collector by „byContext“. It is new SOLR collector which uses SOLR query syntax for resource selection:

http://documentation.opencms.org/opencms-documentation/solr-search-integration/index.html

 

Take a look at the list module – here is used <cms: formatter> tag for loading data from list xmlcotent and <cms: contentload> from loading data from other resources (that are defined in xmlcotent):

https://github.com/alkacon/modules-v8/blob/branch_9_5_x/modules/com.alkacon.bootstrap.formatters/resources/system/modules/com.alkacon.bootstrap.formatters/formatters/list-large.jsp

https://github.com/alkacon/modules-v8/blob/branch_9_5_x/modules/com.alkacon.bootstrap.formatters/resources/system/modules/com.alkacon.bootstrap.formatters/elements/list-large-singlepage.jsp

 

Have funJ

 

--
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 Ricardo Sanchez
Sent: Thursday, September 10, 2015 2:29 PM
To: opencms-dev at opencms.org
Subject: [opencms-dev] Replace <cms: contentload> to <cms: formatter>

 

Hello list:

 

In one of the steps in the migration, I must replace the <cms: contentload> by <cms: formatter>, but I do not do the correct translation for when I want to run the JSP receive the following error:

 

As an example, I have <cms: contentload collector = "allInFolderPriorityDateDesc" param = "/ sites / acsucylprueba / sites / ACSUCyL / home / copyright / link _% (number) .html | Link" editable = "false"> and change by <cms: var formatter = "allInFolderPriorityDateDesc" val = "/ sites / acsucylprueba / sites / ACSUCyL / home / copyright / link _% (number) .html | link">

 

Am I doing something wrong with this change?

 

Cheers

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


More information about the opencms-dev mailing list