Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • siva 5 posts 25 karma points
    Sep 14, 2012 @ 11:10
    siva
    0

    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

  • Ismail Mayat 4511 posts 10092 karma points MVP 2x admin c-trib
    Sep 14, 2012 @ 11:21
    Ismail Mayat
    0

    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

  • siva 5 posts 25 karma points
    Sep 14, 2012 @ 12:02
    siva
    0

    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" />

Please Sign in or register to post replies

Write your reply to:

Draft