Skip to main content

Adding Bespoke Content Locations

How to add Bespoke content areas to a theme

 

A bespoke theme or client design often required additional areas within the header, footer and navigation areas of the page that may require some content that needs to be content managed.

EonicWeb allows the developer to easily add these into the theme by calling some common XSLT templates that enable the content in these sections to be content managed.

These usually site within the template

<xsl:template match="Page" mode="bodyDisplay"> 

Which usually resides within the themes standard.xsl

"Position" is the unique location on the page where the content will be listed, standard positions which are used within the page layouts must be avoided these are....

  • header
  • column1
  • column2
  • column3
  • footer
 

Adding a Module Location

 
<xsl:apply-templates select="/Page" mode="addModule">
	<xsl:with-param name="text">Add Module</xsl:with-param>
	<xsl:with-param name="position">LeftNav</xsl:with-param>
</xsl:apply-templates>
 
 

Adding a module location like this allows multiple modules of any type to be added to this location on the page. notice this example the location on the page is 'leftNav' this code would be placed below the section of the page where a left hand navigation would be rendered.

AddModule allows for multiple modules to be added to this location via the CMS.

 

Adding a Single Module Location

 
<xsl:apply-templates select="/Page" mode="addSingleModule">
     <xsl:with-param name="text">Add Module</xsl:with-param>
     <xsl:with-param name="position">mainHeaderStrapline</xsl:with-param>
</xsl:apply-templates>
 
 

This illustrates how to add a single module to a position on the page, only one module can be added here and the drag and drop facility will not work. The module can be of any type available.

 

Adding a bespoke Single content type

 
<div id="contact" class="sampleClass">
    <xsl:apply-templates select="/Page" mode="inlinePopupSingle">
            <xsl:with-param name="type">FormattedText,Image,PlainText</xsl:with-param>
            <xsl:with-param name="text">Add Contact Info</xsl:with-param>
            <xsl:with-param name="name">Contact</xsl:with-param>
            <xsl:with-param name="class">SampleClass</xsl:with-param>
   </xsl:apply-templates>
   <xsl:apply-templates select="Contents/Content[@name='Contact' and (@type='Image' or @type='FormattedText' or @type='PlainText')]" mode="displayBrief"/>
</div>
 
 

This illustrates how to add a single item of a specific "content type" to this location of a page.

Not the class param needs to be added as the class gets replaced in admin mode and any class needs to be added to the param.

Content types available can be comma separated if more than one type may be options.

To be clear the "content types" are distinct from "module types" at the moment there is no facility to specify a specific "module type" to go into a location.

This is best used where the "box style" and other module features are not appropriate for this specific location on a page.