Skip to content

site.xml

site.xml extends site behavior. Packages can add site attributes, site types, site settings, and tabs for site editor panels.

Use it when a package needs project page types or site-specific editor UI.

Attributes

Add attributes that can be stored on site objects.

xml
<site>
    <attributes>
        <attribute>vendor.package.attribute</attribute>
        <attribute default="10">vendor.package.limit</attribute>
    </attributes>
</site>

Use package-scoped attribute names to avoid collisions.

Site Types

Use <types> to register package-provided site types.

xml
<types>
    <type type="types/gallery-grid" icon="fa fa-picture-o">
        <locale group="quiqqer/gallery" var="admin.types.gallery.grid"/>
        <desc>
            <locale group="quiqqer/gallery" var="admin.types.gallery.grid.desc"/>
        </desc>
    </type>
</types>

Site types can declare attributes and settings that are specific to that type. The stored type identifier is package-scoped. If a package registers types/gallery-grid, QUIQQER addresses it as vendor/package:types/gallery-grid.

Site types can also declare events:

xml
<types>
    <type type="types/gallery-grid">
        <event on="quiqqer.site.save" fire="\Vendor\Package\Event::onSave"/>
    </type>
</types>

Use type events only for behavior that belongs to that site type.

Site Settings

Site type settings use the same category and input structure as other QUIQQER settings XML areas.

xml
<settings>
    <category name="gallery-list-settings">
        <settings>
            <title>
                <locale group="quiqqer/gallery" var="quiqqer.gallery.settings.title"/>
            </title>

            <input conf="quiqqer.settings.gallery.folderId" type="text" class="media-folder">
                <text>
                    <locale group="quiqqer/gallery" var="quiqqer.gallery.settings.folderId"/>
                </text>
            </input>
        </settings>
    </category>
</settings>

Editor Tabs

Use <window> to add tabs to site editor panels.

xml
<window>
    <tab name="quiqqer.bricks">
        <text>
            <locale group="quiqqer/bricks" var="site.panel.bricks.category.title"/>
        </text>
        <image>fa fa-th</image>
        <onload require="package/quiqqer/bricks/bin/Site/Category"></onload>
    </tab>
</window>

Use this when the package needs a custom editor category for all or selected site panels.

QUIQQER reads tabs from the site/window structure.

Real Package Shape

quiqqer/bricks adds a site attribute and a site editor tab:

xml
<site>
    <attributes>
        <attribute>quiqqer.bricks.areas</attribute>
    </attributes>

    <window>
        <tab name="quiqqer.bricks">
            <text>
                <locale group="quiqqer/bricks" var="site.panel.bricks.category.title"/>
            </text>
            <image>fa fa-th</image>
            <onload require="package/quiqqer/bricks/bin/Site/Category"></onload>
        </tab>
    </window>
</site>

Practical Checklist

Before adding site.xml:

  • Use package-scoped site attribute names.
  • Add site types only when the package provides rendering behavior for them.
  • Use localized names and descriptions for site types and settings.
  • Keep custom tabs focused on site editing tasks.
  • Put complex UI into package AMD modules and load them with onload.

Released under GPL-3.0-or-later.