This feature is available from version 4.8.
Virtual pages have default configurations. These configurations contain content and/or services. These virtual pages can be overloaded by project and by graphic charter.
From Ametys 4.9
<model template="page"> <zone id="default"> <service id="org.ametys.web.service.SitemapService"> <parameters> <!-- paramètres du service sous la forme <paramName>value</paramName> --> </parameters> <view-parameters> <!-- paramètres de vues du service sous la forme <paramName>value</paramName> --> </view-parameters> </service> <content view="main"> <view-parameters> <!-- paramètres de vues du contenu sous la forme <paramName>value</paramName> --> </view-parameters> </content> </zone> </model>
Ametys 4.8
<model template="page"> <zone id="default"> <service id="org.ametys.web.service.SitemapService"> <!-- paramètres du service --> </service> <content view="main"/> </zone> </model>
The template of the tag <model> Defines the template to use for virtual pages. If not specified, the "page" template will be used by default.
The <zone> defines in which zone the defined content/service(s) will be added. The attribute id allows the area to be identified.
The <service> allows you to add a service in the area. The attribute id allows the service to be identified.
Any service parameters are defined inside the tag in the form <paramName>value</paramName>:
Ametys 4.9 supports service view parameters. They must be valued in a tag <view-parameters> in the form <paramName>value</paramName>
The <content> allows you to configure where the content will be inserted in the page, as well as the content view used via the attribute view.
Ametys 4.9 supports content view parameters. They must be valued in a tag <view-parameters> in the form <paramName>value</paramName>
Note
The <content> is only required if the virtual page is a virtual page that must display content.
If the tag is present but not supported by the virtual page, you will get an error like « Java.lang.UnsupportedOperationException: This virtual page does not have a content and the overriding configuration requires one. »
Par défaut Ametys propose une configuration pour chaque ensemble/type de pages virtuelles. Celles-ci se trouvent dans les plugins dans le répertoire"main/<nomPlugin>/virtual-pages/".
These default configurations are all overloadable.
Overloads are read in this order:
The charter configuration will therefore take precedence over the project configuration, and both will take precedence over the default configuration.