The details overview on the right hand side of the Content Navigator is generated by Velocity templates. For each of the five file types that exist in CMS Fiona such a template is available.
In the details overview you can have more fields than the default
ones displayed. To achieve this, call a macro,
attributeGroupInOverview
(supplied with the CMS), from
within one or more of the five templates. This macro adds all the
fields of the specified field group (here called "overview") to the
details overview concerned:
#attributeGroupInOverview($content.getAttributeGroup('overview'))
The macro terminates silently if the specified field group does not
exist, meaning that it is safe to use it. It can be found, like other
macros, in the file
webapps/GUI/WEB-INF/inspectors/default_macros.vm
.
After this macro has been added to all
objType-overview.vm
files, anyone permitted to
modify file formats in the CMS can add an overview
field
group to any file format. Then add the fields to be displayed in the
extended details overview to the overview
field group.
To prevent your changes from being overwritten when migrating the
CMS to another version, place the contents of the template file
directly into the contentInspectors.xml
file:
<templates> <template name="publication-overview.vm"><![CDATA[ ... previous content of publication-overview.vm ... #attributeGroupInOverview($content.getAttributeGroup('overview')) ]]></template> </templates>
However, if you always wish to use the latest versions of the
*.vm
files, you should not only modify the templates but
also overwrite the corresponding objType-overview
beans. Specifying individual templates here gives you the possibilty to
include the supplied template (using parse
) as well as
call the macro that adds the field group to the details overview.
If this procedure is to be applied to the overviews of several file
types, and the titles of these overviews are identical, it is more
efficient to join the multi-language titles of these views into an
individual bean. This bean can then be referenced as
parent
in the view beans themselves. The following example
demonstrates this for the publication
details overview.
<?xml version="1.0" encoding="UTF-8"?> <contentInspectors> <beans> <bean id="overview-titles" class="com.infopark.cm.htmlgui.browse.inspector.View" abstract="true"> <property name="titles"><map> <entry key="de" value="Eigenschaften"/> <entry key="en" value="Overview"/> <entry key="fr" value="Propriétés"/> <entry key="it" value="Proprietà"/> <entry key="es" value="Propiedades"/> </map></property> </bean> <bean id="publication-overview" parent="overview-titles"> <property name="template" value="advanced_publication-overview.vm"/> </bean> </beans> <templates> <template name="advanced_publication-overview.vm"><![CDATA[ #parse("publication-overview.vm") #attributeGroupInOverview($content.getAttributeGroup("overview")) ]]></template> </templates> </contentInspectors>