Overloading of virtual pages in the classifieds tree structure


This feature is available from version 1.11.

General point on virtual pages: Overloading virtual pages

  1. Description
  2. Overloads
    1. Example

Description

In the classifieds tree, created from the "classifieds root" button, there are 2 types of virtual pages that can be overloaded: 

Overloads

Description

Overload file name

Default configuration file 

Intermediate pages in the classifieds tree

ugc.classified-ads.transitional.xml

<model template="ugc-transitional-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>
    </zone>
</model>

Last-level pages in the classifieds tree structure

ugc.classified-ads.page.xml

<model template="ugc-page">
    <zone id="default"> 
        <content view="main"/>
    </zone>
</model>

Reminder: Overload files should therefore be named: ugc.classified-ads.transitional.xml for intermediate pages in the tree structure and ugc.classified-ads.page.xml for pages containing ads.

Example

Overload of the configuration file of the virtual pages that contain the ads (ugc.classified-ads.page.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
    • Placing content (the ad) after the service
Back to top

Classified Ads