tag:help-archives.hannonhill.com,2010-02-09:/discussions/how-do-i/19-system-tag-as-html-body-attributeCascade CMS: Discussion 2014-03-25T20:54:11Ztag:help-archives.hannonhill.com,2010-02-09:Comment/16495082010-05-10T20:52:29Z2010-05-10T20:52:29Zsystem tag as HTML body attribute<div><p>There aren't any system region tags that will enable you to do
this, but you could potentially add or modify the <code>id</code>
attribute of the <code><body></code> tag by attaching a
Format at the Template, Configuration Set, or Page level.<br></p>
<p>For example, try something like this:<br>
* Create a new XSLT Format with code like this:</p>
<pre>
<code><?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="/*">
<xsl:copy>
<xsl:apply-templates/>
<xsl:copy-of select="@*"/>
</xsl:copy>
</xsl:template>
<xsl:template match="node()[name()='body']">
<xsl:copy>
<xsl:attribute name="id">idGoesHere</xsl:attribute> <!--id goes here -->
<xsl:copy-of select="@*"/>
<xsl:copy-of select="./node()"/>
</xsl:copy>
</xsl:template>
<xsl:template match="*">
<xsl:copy-of select="."/>
</xsl:template>
</xsl:stylesheet></code>
</pre>
<ul>
<li>Edit your Template, click the <strong>Regions</strong> pane,
then select this Format for the very first field (labeled
<strong>XSLT Format</strong>). Attaching the Format here (as
opposed to in a specific region) will make the Format transform the
fully rendered page. This is how you are able to access the
<code><body></code> tag.</li>
</ul>
<p>The sample XSLT Format I included above will change
<code><body></code> to <code><body
id="idGoesHere"></code>. For now, this is a static id that is
hard-coded into the XSLT Format. You could, however, have something
set up to where this Format would look for a specific element on
the page and change the id depending on the value of that
element.</p>
<p>Hope this helps!<br></p></div>Timtag:help-archives.hannonhill.com,2010-02-09:Comment/16495082010-05-11T19:37:13Z2010-05-11T19:37:17Zsystem tag as HTML body attribute<div><p>Thank you very much!</p></div>stulktag:help-archives.hannonhill.com,2010-02-09:Comment/16495082010-05-11T19:55:38Z2010-05-11T19:55:38Zsystem tag as HTML body attribute<div><p>No problem!</p></div>Tim