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?
Asked
Active
Viewed 350 times
2 Answers
1
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.)

Laurence Rowe
- 2,909
- 17
- 20
0
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:

Community
- 1
- 1

Giacomo Spettoli
- 4,476
- 1
- 16
- 24
-
This isn't working for me. Did you notice that this element is in the theme? I never replace it with something from the content. – Ross Patterson Dec 15 '11 at 14:56
-
when you say "*id clash clash between the theme and the content*" one thinks that you are replacing/copying something from the content to the theme. Anyway, I would try to skip the first line, using the rest. If it doesn't work either, I hope that you can find more clues on the linked doc. Good luck – Giacomo Spettoli Dec 15 '11 at 15:23