[opencms-dev] Mapping two elements to Title property
Paoletti Corrado
c.paoletti at fineco.it
Tue Sep 25 12:11:14 CEST 2018
Hi,
I have a schema that contains:
<xsd:element name="Categoria" type="OpenCmsString" />
<xsd:element name="Titolo" type="OpenCmsString" />
<xsd:element name="Anteprima" type="OpenCmsString" />
<xsd:element name="Video" type="OpenCmsString" />
<xsd:element name="Data" type="OpenCmsDateTime" />
<xsd:element name="Estratto" type="OpenCmsString" />
<xsd:element name="Testo" type="OpenCmsHtml" />
<xsd:element name="Bottone" type="OpenCmsString" />
<xsd:element name="Pagina" type="OpenCmsString" />
<xsd:element name="Social" type="OpenCmsSocial" />
<xsd:element name="Test" type="OpenCmsString" />
What I would like is to mapping two elements - Data and Titolo - to the Title file property.
<mappings>
<mapping element="Data" mapto="property:Title" />
</mappings>
Documentations does not explain how could I do it. At the moment I partially solved using Test element:
<mappings>
<mapping element="Test" mapto="property:Title" />
</mappings>
<defaults>
<default element="Test" value="%(currenttime)%(no_prefix:: )%(value:Titolo[1])" resolveMacros="false" />
</defaults>
but with this solution %(currenttime) macro prints date/time in millisecond and not formatted date.
Does anyone have any suggestions?
Kinds regards?
Corrado
More information about the opencms-dev
mailing list