Copied to clipboard

Flag this post as spam?

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


  • metalforgood 36 posts 55 karma points
    Oct 17, 2011 @ 14:29
    metalforgood
    0

    Render RichText Editor in xslt

    hi , i am using umbraco v 4.7, i made a macro that loops subpages and write the values

    the point is i don't know how to render the richtexteditor :(

    here's the code :


    <ul>
    <xsl:for-each select="$currentPage/NewsArticle">
    <xsl:sort select="@updateDate" order="descending"/>

        <li>
         
          <href="{umbraco.library:NiceUrl(@id)}">
            <xsl:value-of select="@nodeName"/>
          </a>
          <p>
            <xsl:value-of select="title"/>
            <xsl:value-of select="articleContent"/>
             
          </p>
        
          
        </li>

    </xsl:for-each>
    </ul>

    ------------

    it returns the title correctly, coz it's a text string ,but the articleContent which data type is richtext editor

    it returns it as html text i.e :

    <p>Some Bla Bla Bla and a photo&nbsp;<img src="/media/47/icon-1.png" width="28" height="27" alt="Icon -1"/></p>

    i have tried  to replace it with   <xsl:value-of select="data [@alias = 'articleContent']"disable-output-escaping="yes"/>

    but this time it gives no output at all ,
    help :)

  • Chriztian Steinmeier 2800 posts 8791 karma points MVP 8x admin c-trib
    Oct 17, 2011 @ 14:31
    Chriztian Steinmeier
    0

    Hi,

    The correct syntax for that is:

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

    /Chriztian

  • metalforgood 36 posts 55 karma points
    Oct 17, 2011 @ 14:34
    metalforgood
    0

    ahhh thanks :)))))) it worked :) 

  • Dan Okkels Brendstrup 101 posts 197 karma points
    Oct 17, 2011 @ 14:52
    Dan Okkels Brendstrup
    1

    However, be aware that an <xsl:value-of /> will work perfectly well for outputting regular rich text content, but it won't render any macros that have been embedded in the rich text editor.

    If you have that requirement, you can instead use the Item-extension, similar to the call you would make in a masterpage:

    <xsl:value-of select="umbraco.library:Item($currentPage/@id, articleContent)"/>
  • metalforgood 36 posts 55 karma points
    Oct 17, 2011 @ 14:55
    metalforgood
    0

    aha, thank you Dan that was valuable :)

  • Arvind 4 posts 24 karma points
    May 16, 2013 @ 05:13
    Arvind
    0

    Hi,

    I have an asp.net application, input to this application is XML files. I have a requirement of implementing rich text XML editor(using Umbraco) for editing XML files. These files have to be validated against pre-defined XSD schema files. I am using umbraco v4.7.2

    I tried to find if there is any plug-in available in Umbraco to acheive this. Or any pointer for implementing this.

    Thanks in advance for all the help !

    Regards,

    Arvind

     

     

     

     

  • Chriztian Steinmeier 2800 posts 8791 karma points MVP 8x admin c-trib
    May 16, 2013 @ 08:45
    Chriztian Steinmeier
    0

    Hi Arvind,

    You'll get better responses if you create a new thread about this;

    But yes, you can use Umbraco to manage almost any type of content.

    You can setup Data Types with validation requirements, and e.g. for "choice" types you can have the choices selectable from a dropdown, radio buttons or similar.

    You would then use an XSLT macro to actually generate the XML output (which could get its own URL) so you would be able to control 80%–90% of the validation requirements w/ regards to the XMLSchemas there.

    Hope that helps you decide,

    /Chriztian 

  • Arvind 4 posts 24 karma points
    May 16, 2013 @ 22:12
    Arvind
    0

    Hi Chriztian,

    Thanks for the inputs. I will check it and let you know the outcome.

    Regards,

    Arvind

     

     


  • Arvind 4 posts 24 karma points
    May 19, 2013 @ 17:19
    Arvind
    0

    Hi Chriztian,

    Actually I am new to Umbraco so did not get the complete context. I checked in Umbraco for the datatypes, I can see Richtext Editor datatype there, are you talking about using this editor (to customize for xml). 

    I am not sure about it. Please provide me some example for editing XML files using Umbraco. XML file and implementation of editor, something like that.

    I will really be grateful to you.

    Regards,

    Arvind

Please Sign in or register to post replies

Write your reply to:

Draft