Hi, i am using umbraco v
4.8.1, am new in using Umbraco.. can someone help me how to find and replace text in the template file..
For example, if i have<umbraco:Item field="FullDescription"runat="server" /> in my template file and if i want to replace some text coming in tat "FullDescription" field with some text, wat should i do?? am looking for assistance..Thanks in advance
In the template instead of using umbraco:Item you could create a razor or xlst macro and then do the search and replace there then write out the field.
Text Replace in Template File
Hi, i am using umbraco v 4.8.1, am new in using Umbraco.. can someone help me how to find and replace text in the template file..
For example, if i have <umbraco:Item field="FullDescription" runat="server" /> in my template file and if i want to replace some text coming in tat "FullDescription" field with some text, wat should i do?? am looking for assistance..Thanks in advance
Siva,
In the template instead of using umbraco:Item you could create a razor or xlst macro and then do the search and replace there then write out the field.
Regards
Ismail
Hi Ismail thanks for your valuble suggestion, we could also do like this in template file for find and replace text.. Working fine....
<umbraco:Item field="FullDescription" xslt="umbraco.library:Replace({0},'string to be replaced','mynewstring')" runat="server" />
is working on a reply...