Content tree root


The plugin UGC provides an abstract button for defining a page as the root of a content type's virtual tree.

To integrate the content offered via a virtual tree, you can define a button based on the one provided by plugin UGC and customize it:

  • button label/description
  • the content type used to create the tree structure (ugc-content-type)
  • the content type field used to classify content (ugc-metadatPath). This parameter is optional:
    • if not defined: the user is free to choose his classification data from CONTENT or enumerated data of the chosen content type.
    • if empty: there will be no classification data. All content will be at the root of the tree.
    • if not empty: classification will be based on this data and cannot be changed.
  • the right to access this button

You can also customize the button's messages and tooltips.

The plugin Classified Ads defines a button to position a page as the root of classified ads. Classified ads pages are classified according to the "Category" field

<extension ref-id="org.ametys.plugins.ugc.SetRoot" 
id="org.ametys.plugins.classified.ads.SetRoot" 
point="org.ametys.core.ui.RibbonControlsManager" 
class="org.ametys.plugins.ugc.clientsideelement.SetUGCRootClientSideElement"> 
    <class > 
        <label i18n="true">PLUGINS_CLASSIFIED_ADS_SET_ROOT_LABEL</label> 
        <description i18n="true">PLUGINS_CLASSIFIED_ADS_SET_ROOT_DESCRIPTION</description> 

        <ugc-content-type>org.ametys.plugins.classified.ads.Content.ads</ugc-content-type> 
        <ugc-metadataPath>category</ugc-metadataPath> 

        <ugc-page-end-description i18n="true">PLUGINS_CLASSIFIED_ADS_SET_ROOT_ADD_PAGE_END_DESCRIPTION</ugc-page-end-description> 
        <no-jcr-page-end-description i18n="true">PLUGINS_CLASSIFIED_ADS_SET_ROOT_NOJCR_PAGE_END_DESCRIPTION</no-jcr-page-end-description> 
        <add-ugc-page-end-description i18n="true">PLUGINS_CLASSIFIED_ADS_SET_ROOT_PAGE_END_DESCRIPTION</add-ugc-page-end-description> 
        <remove-ugc-page-end-description i18n="true">PLUGINS_CLASSIFIED_ADS_SET_ROOT_REMOVE_PAGE_END_DESCRIPTION</remove-ugc-page-end-description> 
        <ugc-page-already-exist i18n="true">PLUGINS_CLASSIFIED_ADS_SET_ROOT_ALREADY_EXIST_DESCRIPTION</ugc-page-already-exist> 

        <ugc-dialog-title i18n="true">PLUGINS_CLASSIFIED_ADS_SET_ROOT_PAGE_BOX_TITLE</ugc-dialog-title> 
        <ugc-dialog-hint i18n="true">PLUGINS_CLASSIFIED_ADS_SET_ROOT_PAGE_BOX_HINT</ugc-dialog-hint> 
        <ugc-dialog-confirm i18n="true">PLUGINS_CLASSIFIED_ADS_ROOT_PAGE_CONFIRM</ugc-dialog-confirm> 
        <ugc-dialog-delete-confirm i18n="true">PLUGINS_CLASSIFIED_ADS_ROOT_PAGE_DELETE_CONFIRM</ugc-dialog-delete-confirm> 
        <ugc-dialog-icon>ametysicon-newspaper1</ugc-dialog-icon> 

        <icon-glyph>ametysicon-newspaper1</icon-glyph> 
    </class> 
    <right>Classified_Ads_Right_Set_Root</right> 
</extension> 
Back to top

UGC