This chapter is reserved for .

Definition

A site typology will determine the types of content, services and tools available, adapted to the type of site (corporate site, blog, intranet, etc.).

The extension point org.ametys.web.repository.site.SiteTypesExtensionPoint is used to define a site typology. This is a multiple extension pointThis means that several implementations of the extension point can be active at the same time.

To date, there are 2 types of site on Ametys :

  • org.ametys.web.sitetype.Default: website with classic sitemap
  • org.ametys.plugins.blog.sitetype.Blog: "blog" type site


All types of site can be found when creating a new site:

Declaration of a new type of site

A site type is defined by:

  • a unique name with no spaces or special characters
  • a wording
  • a description
  • 3 icons in sizes 16x16 pixels, 32x32 pixels and 48x48 pixels
  • 3 icons: 16x16 pixels, 32x32 pixels and 48x48 pixels for incomplete configurations

The declaration of a site type is made in a plugin.xml file. If you need to create a new plugin, follow the instructions on the plugin Ametys page.

Here is an example of the "default" site type declaration:

<extension id="org.ametys.web.sitetype.Default"
           point="org.ametys.web.repository.site.SiteTypesExtensionPoint"
           class="org.ametys.web.repository.site.DefaultSiteType">
   	<name>default</name>
    <label i18n="true">PLUGINS_WEB_SITETYPE_DEFAULT_LABEL</label>
    <description i18n="true">PLUGINS_WEB_SITETYPE_DEFAULT_DESCRIPTION</description>
    <icons>
    	<small>img/sitetype/default_16.png</small>
        <medium>img/sitetype/default_32.png</medium>
        <large>img/sitetype/default_48.png</large>
    </icons>
    <invalid-icons>
    	<small>img/sitetype/default_invalid_16.png</small>
        <medium>img/sitetype/default_invalid_32.png</medium>
        <large>img/sitetype/default_invalid_48.png</large>
    </invalid-icons>
</extension>

The icon path is relative to the "resources" directory in which the site type is declared.

The icons defined in <icons> are used in the normal case:



The icons defined in <invalid-icons> are used when the site configuration is incomplete:

Configuration

For each type of site, you will need to create 4 configuration files XML in the directory WEB-INF/param of your application:

 

Back to top