how to use a dictionary item inside an html attribute
Having an interesting challenge/problem. Because of the three sets of quotes, I seem to be unable to write a dictionary item inside an HTML tag attribute:
I've got the HTML <input value="">, the <xsl:value-of select="", and then the GetDictionaryItem param ("Locate Button"). I am getting an error from my XSLT trying to do this. Do I need to escape one of these sets? If so, which ones, and how?? I thought of creating a Macro which takes the Dictionary Item as a param; this would eliminate one set; but the problem there is that I am Already inside a Macro here.
How to do accomplish this? Seems like someone would have run into the same problem before. For example, with an <img src=""> or something like that.
how to use a dictionary item inside an html attribute
Having an interesting challenge/problem. Because of the three sets of quotes, I seem to be unable to write a dictionary item inside an HTML tag attribute:
I've got the HTML <input value="">, the <xsl:value-of select="", and then the GetDictionaryItem param ("Locate Button"). I am getting an error from my XSLT trying to do this. Do I need to escape one of these sets? If so, which ones, and how?? I thought of creating a Macro which takes the Dictionary Item as a param; this would eliminate one set; but the problem there is that I am Already inside a Macro here.
How to do accomplish this? Seems like someone would have run into the same problem before. For example, with an <img src=""> or something like that.
Thanks in advance,
Garrett
If you're already in xslt try
dan
Be sure to notice Dan's use of single and double quotes.
You could also use select="umbraco.library:GetDictionaryItem('Locate Button')" if you prefer that.
cheers,
doug.
<input id="loc" name="loc" type="text" value="{umbraco.library:GetDictionaryItem('Locate Button')}" />
Thanks to all, but this last one is genius. I KNEW I was missing something obvious :) Umbraco forum is the best.
//Garrett
is working on a reply...