Skip to main content

Add a Module to a theme

Adding a Module Location to a Theme

 

When developing a theme / or a bespoke theme for a client you may want to add a module location outside of the main layout.

For instance in the header / footer / or under the left hand sub navigation.

This will allow you to add multiple items of content to this module location, and for the drag and drop to work.

<div id="header-background">

         <xsl:apply-templates select="/Page" mode="addModule">

          <xsl:with-param name="text">Add Module</xsl:with-param>

          <xsl:with-param name="position">header-background</xsl:with-param>

          <xsl:with-param name="class">header-wrapper header1</xsl:with-param>

        </xsl:apply-templates>

</div>

Note: The module needs to have an id, wrapped around it

In the case shown below is in form of a div id="header-background" look at the xsl:with-param name="position note that it has the same name as the id of the div.

This is important so the module knows where to place on the page.