Overloaded virtual training pages


This feature is available from version 4.8.

General point on virtual pages: Overloading virtual pages

  1. Description
  2. Overloads
  3. Example

Description

In the training offer tree, created from the "Training offer root" button, there are 4 types of virtual pages that can be overloaded: 

Overloads

Description

Overload file name

Default configuration file 

Top-level virtual pages

odf-level-1.xml

<model template="program-list">
    <zone id="default"> 
        <service id="org.ametys.web.service.SitemapService">
            <depth>2</depth>
            <all>false</all>
        </service>
    </zone>
</model>

Second-level virtual pages

odf-level-2.xml 

<model template="program-list">
    <zone id="default"> 
        <service id="org.ametys.web.service.SitemapService">
            <depth>1</depth>
            <all>false</all>
        </service>
    </zone>
</model>

Virtual pages containing a training course or itinerary

odf-program.xml

<model template="program">
    <zone id="default">
        <content view="main"/>
    </zone>
</model>

The last level pages of the training offer, containing the ELP

odf-course.xml

<model template="course">
    <zone id="default"> 
        <content view="main"/>
    </zone>
</model>

Reminder: Overload files should therefore be named: odf-level-1.xml for first-level pages, odf-level-2.xml for second-level pages, odf-program.xml for training pages and odf-course.xml for course pages.ELP

Example

Overloading of the configuration file for the virtual pages that contain the courses (odf-program.xml)

<model template="page">
    <zone id="default">
<service id="org.ametys.web.service.SitemapService">
            <depth i18n="false">1</depth>
            <all i18n="false">false</all>
            <includeInvisiblePage i18n="false">true</includeInvisiblePage>
        </service>
        <content view="main"/>
    </zone>
</model>
  • Change template to "page
  • Addition of the "default" zone
    • Add a service to the zone
    • Placement of content (program or route) after the service
Back to top