Return to doc.sitecore.com

Rendering Metadata

Because it appears in the Layout within the HTML <head> element, an XSL Rendering for <meta>, <title>, <link> and other <head> elements cannot be added to the Layout with the browser-based WYSIWYG editor.  Since it will not be bound to a Placeholder dynamically, and can’t be dragged into the Layout, it is not necessary to register the Metadata Rendering with Sitecore, it can be created by simply copying an existing XSL Rendering file and stripping any unneeded content. 

Please remember that when copying layout components which represent files through the Sitecore UI, references to files are copied – editing either copy will update the same resource on disk.

Remove any existing <title> element from Layouts which will use the Metadata Rendering.  <link> elements can be hard-coded in the Layout or generated with the Metadata Rendering.  Invoke the Metadata Rendering after declaring the content type:

<sc:xslfile runat="server" path="/xsl/Metadata.xslt" id="rMeta" />

See /xsl/Metadata.xslt.