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 :

<model template="page">
<zone id="default">
<service id="org.ametys.web.service.SitemapService">
… paramètres du service…
</service>
<content view="main"/>
</zone>
</model>
  • Beacon model: The root tag
    • Template attribute: The template for virtual pages. If not set, the "page" template will be set by default.
    • Beacon zoneAdd a zone. 
      • Attribute id: The desired identifier for the zone. If the chosen id is already present, the last zone with the id will be kept.
      • Beacon serviceAdd a service
        • Attribute id: The identifier of the desired service
      • Content tag: Adds content to the virtual page. Allows you to choose where the page content will be displayed.

The "content" tag cannot be present for a virtual page that has no content. This causes an error: " 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