This feature is available from version 4.8.
General point on virtual pages: Overloading virtual pages
Description Overloads 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
Oops! Copy to clipboard failed. Open the code and copy it manually.<model template="program-list">
<zone id="default">
<service id="org.ametys.web.service.SitemapService">
<depth>2</depth>
<all>false</all>
</service>
</zone>
</model> <model template="program-list">
<zone id="default">
<service id="org.ametys.web.service.SitemapService">
<depth>2</depth>
<all>false</all>
</service>
</zone>
</model>
<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
Oops! Copy to clipboard failed. Open the code and copy it manually.<model template="program-list">
<zone id="default">
<service id="org.ametys.web.service.SitemapService">
<depth>1</depth>
<all>false</all>
</service>
</zone>
</model> <model template="program-list">
<zone id="default">
<service id="org.ametys.web.service.SitemapService">
<depth>1</depth>
<all>false</all>
</service>
</zone>
</model>
<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
Oops! Copy to clipboard failed. Open the code and copy it manually.<model template="program">
<zone id="default">
<content view="main"/>
</zone>
</model> <model template="program">
<zone id="default">
<content view="main"/>
</zone>
</model>
<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
Oops! Copy to clipboard failed. Open the code and copy it manually.<model template="course">
<zone id="default">
<content view="main"/>
</zone>
</model> <model template="course">
<zone id="default">
<content view="main"/>
</zone>
</model>
<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)
Oops! Copy to clipboard failed. Open the code and copy it manually.<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> <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>
<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