Copied to clipboard

Flag this post as spam?

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


  • Angie 9 posts 29 karma points
    Nov 01, 2010 @ 06:46
    Angie
    0

    insert XSLT:value of

    Hi. I'm new with Umbraco and XSLT. I have installed Umbraco 4.5.2. I wanted to try making a news list just like the video tutorial called 'creating a news list'.

    I want to have the news title and summary below it (just like in the video). So in the xslt editor, i inserted the value:

    <xsl:value-of select="summary"/>  

    My problem is, its not displayed correctly in the browser. My news section looks like this:

    China to the Rescue: Growing Out of the Financial Crisis

    <p>Vedlagt er artikel med vores speaker ved næste møde</p>

    Global fixes needed for global crisis

    <p><span>By speaker to August INBC/DBA event</span><br /> THE current financial and economic crisis seems to be moving into a phase where the deceleration is losing steam. But we are still in unknown territory, wondering how long it will take before a flat economy caught by stagnation will gain sufficient momentum to accelerate.</p>

     

    How can I display the news summary without having the html tags? Thanks

  • Lee Kelleher 4026 posts 15837 karma points MVP 13x admin c-trib
    Nov 01, 2010 @ 07:14
    Lee Kelleher
    2

    Hi Angie, welcome to Umbraco!

    If you want to render the HTML, (not display the tags), then add the following attribute to your XSLT:

    <xsl:value-of select="summary" disable-output-escaping="yes" />

    ... or if you want to remove the HTML formatting completely, try this:

    <xsl:value-of select="umbraco.library:StripHtml(summary)"/>

    Cheers, Lee.

  • Angie 9 posts 29 karma points
    Nov 01, 2010 @ 07:28
    Angie
    0

    It works..Thanks, Lee :)

  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

Please Sign in or register to post replies