Ross Patterson
Ross Patterson

Reputation: 5742

Change the id of a theme element

Using Diazo, I have an id clash between the theme and the content and some JS which depends on the content id. How can I change the elements id attribute in the theme from one value to another?

Upvotes: 0

Views: 356

Answers (2)

Laurence Rowe
Laurence Rowe

Reputation: 2999

The easiest way to change a value in the theme is to open it in your editor and edit the html ;) If you're after changing the id in the content to match markup in the theme then you can use a replace content rule, see: http://diazo.org/advanced.html#modifying-the-content-on-the-fly

(The replace content rule basically replaces xsl:template's in Diazo. The latter still work, but you should normally use the replace content now.)

Upvotes: 1

Giacomo Spettoli
Giacomo Spettoli

Reputation: 4496

This should work:

<replace css:theme="{theme-selector}" css:content="{content-selector}" />
<xsl:template match="{theme-selector}">
  <xsl:attribute name="{attr-name}">
    <xsl:value-of select="{attr-value}" />
  </xsl:attribute>
</xsl:template>

More info:

Upvotes: 0

Related Questions