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.

  1. Format XML of a virtual page configuration :
  2. Virtual page configuration overload
  3. Overloadable virtual pages

Format XML of a virtual page configuration :

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>:

  • under a tag <parameters> from Ametys 4.9
  • directly under the tag <service> in Ametys 4.8

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. »

Virtual page configuration overload

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: 

  1. Graphic chart overload
    • Find the name of the XML file associated with the page type you want to override(fileName.xml)
    • Redefine this file XML in {skin }/virtual-pages/file-name .xml
  2. Overload per project
    • Find the name of the XML file associated with the page type you want to override(fileName.xml)
    • Redefine this file XML in {AmetysHome}/WEB-INF/param/view/virtual-pages/file-name.xml
  3. Default configuration.

The charter configuration will therefore take precedence over the project configuration, and both will take precedence over the default configuration.

Overloadable virtual pages

 

Back to top