Each template can have from 0 to n display zones. Some zones are populated by types of content or services made available to the contributor. It is possible to restrict the types of content or services available per display zone and per template.
The list of available content types and services can be configured according to :
the type of site, the associated graphic charter and the template used
the type of site, the associated graphic charter, the template used and the zone selected
There is no inheritance, strictly speaking, from this configuration. The most precise configuration wins! So a service exclusion for a site type disappears if a more precise definition exists (in a graphic charter, for example).
The list of available services is defined in a file named services-[siteType].xml
There are two methods:
include: to accept only the services listed in the file. This is the default mode.
Oops!
Copy to clipboard failed. Open the code and copy it manually.
This list of authorized services can be defined in 3 places:
in the WEB-INF/params folder: if present, this file is used to list the services available with this type of site
in the cms/skins/[skinName]/conf folder: if present, this file is used to list the services available with this graphic template
in the cms/skins/[skinName]/template/[templateName]/conf folder: if present, this file is used to list the services available on all pages using this template and for each zone.
In the first two cases, the file structure is as shown above. The file structure is different in the third case.
The file placed in the cms/skins/[skinName]/template/[templateName]/conf folder must follow this structure:
Oops!
Copy to clipboard failed. Open the code and copy it manually.
<?xml version="1.0" encoding="UTF-8"?>
<services>
<!-- List of services included in or excluded from the template by default. -->
<template mode="exclude">
<service id="org.ametys.web.service.InsertContentService"/>
<service id="org.ametys.web.service.FrontSearchService"/>
</template>
<!-- List of services included in or excluded from specific zones. -->
<zones>
<zone id="default" mode="exclude">
<service id="org.ametys.web.service.InsertContentService"/>
<service id="org.ametys.web.service.FrontSearchService"/>
</zone>
<zone id="right-column" mode="include">
<service id="org.ametys.web.service.FilteredContentsService"/>
</zone>
</zones>
</services>
<?xml version="1.0" encoding="UTF-8"?>
<services>
<!-- List of services included in or excluded from the template by default. -->
<template mode="exclude">
<service id="org.ametys.web.service.InsertContentService"/>
<service id="org.ametys.web.service.FrontSearchService"/>
</template>
<!-- List of services included in or excluded from specific zones. -->
<zones>
<zone id="default" mode="exclude">
<service id="org.ametys.web.service.InsertContentService"/>
<service id="org.ametys.web.service.FrontSearchService"/>
</zone>
<zone id="right-column" mode="include">
<service id="org.ametys.web.service.FilteredContentsService"/>
</zone>
</zones>
</services>
<?xml version="1.0" encoding="UTF-8"?>
<services>
<!-- List of services included in or excluded from the template by default. -->
<template mode="exclude">
<service id="org.ametys.web.service.InsertContentService"/>
<service id="org.ametys.web.service.FrontSearchService"/>
</template>
<!-- List of services included in or excluded from specific zones. -->
<zones>
<zone id="default" mode="exclude">
<service id="org.ametys.web.service.InsertContentService"/>
<service id="org.ametys.web.service.FrontSearchService"/>
</zone>
<zone id="right-column" mode="include">
<service id="org.ametys.web.service.FilteredContentsService"/>
</zone>
</zones>
</services>
Note that the "template" and "zones" tags are not mandatory, but at least one of them must be specified. In the same way, not all zones are necessarily defined. If this is not specified, the list of services available in the template is taken into account.