How to create Reusable Content

Topics: General, XSLT
Jul 29, 2011 at 3:31 PM


How do we create reusable content in composite c1 which will be used across all the pages.

For example, header and footer html contents will be stored in an shared location and which will be used in the template files. In that case I can give access to someone who can change the header and footer without changing the template.

Please help me on this.



Jul 29, 2011 at 4:00 PM
Edited Jul 29, 2011 at 4:01 PM


XSLT functions play a key role in designing and developing websites in C1 and can be used to create reusable content like Header/Footer.

Below is an quick example:

1. Create XSLT, e.g. named "Layout.Footer": Functions -> XSLT functions -> right click -> Add XSLT function -> specify Namespace="Layout", Name="Footer" -> on the Template tab create some output:


<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="" xmlns:in="" xmlns:lang="" xmlns:f="" xmlns="" exclude-result-prefixes="xsl in lang f">
  <xsl:template match="/">
	<!-- markup placed here will be shown in the head section of the rendered page --></head>
        <div id="footer">
          <p>Shared content here...</p>

-> Save XSLT ->

2. Go to Layout  perspective -> locate some page template -> edit -> put XSLT function call to the Markup  (Insert -> Function Markup -> select Layout.Footer function ) -> You are done!