Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
I am getting a bit unstuck with trying to manipulate a string based on values from properties in a macro. For example I have a string
this is a string i would like to replace words in
And I would like to replace a number of words based on values the user puts into properties in the macro
<xsl:variable name="searchTerm" select="/macro/searchterm" />
Now say I wanted to replace one of the words in that string - How would I go about doing it? Or should I just be using ASP.NET now I can getting into string manipulation etc...
Thanks in advance =)
Lee,
Use the umbraco extension library method
<xsl:variable name="searchTerm" select="umbraco.library:Replace(/macro/searchterm, 'words', 'test')" />
Top Man - Thanks... I think I need to learn the umbraco.library a bit better ;)
is working on a reply...
Write your reply to:
Upload image
Image will be uploaded when post is submitted
String Manipulation In XSLT?
I am getting a bit unstuck with trying to manipulate a string based on values from properties in a macro. For example I have a string
And I would like to replace a number of words based on values the user puts into properties in the macro
<xsl:variable name="searchTerm" select="/macro/searchterm" />
Now say I wanted to replace one of the words in that string - How would I go about doing it? Or should I just be using ASP.NET now I can getting into string manipulation etc...
Thanks in advance =)
Lee,
Use the umbraco extension library method
<xsl:variable name="searchTerm" select="umbraco.library:Replace(/macro/searchterm, 'words', 'test')" />
Top Man - Thanks... I think I need to learn the umbraco.library a bit better ;)
is working on a reply...