Copied to clipboard

Flag this post as spam?

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


  • kebabskal 27 posts 26 karma points
    Feb 17, 2009 @ 11:49
    kebabskal
    0

    How to render a Rich Text field in XSLT

    Hello!

    I am making a small addition to a site where the customer wants me to add a sidebar with a set of predefined boxes with data.

    I have made a SidebarObject datatype with a simple RichText editor datatype called body.
    On the PageWithSidebar document-type i have an Ultimate Picker with checkboxes that can be checked for each of the SidebarObjects.

    Now I wonder how to render the RichText from the xslt script that iterates through the selected SidebarObjects.
    The rich texts may contain macros (for ImageGen:ed headers etc).

    Any ideas?

    Thanks in advance
    /Hannes

  • kebabskal 27 posts 26 karma points
    Feb 18, 2009 @ 07:20
    kebabskal
    0

    Noone seems to have a solution to this.
    If it is indeed impossible to do this in v4 I think it should be fixed ASAP.
    Especially since this was easily achievable in v3...

    Until that happens I will have to make do without macros:

    This works, but I can't use macros for things like Imagegen Text or a "Latest added pages"-sidebar object.

    A bit annoying, but still <3 umbraco ;)

    /Hannes

  • tallelf78 2 posts 20 karma points
    Mar 11, 2009 @ 21:28
    tallelf78
    0

    Anyone want to tackle this? I'm in the same boat...

    I have 2 macros (added using a Rich Text Editor) and they display correctly in the editor but when I try to render the actual page i can't pull in the formatted macro (but I can get the information for the macro )

    This Code:


    Displays:
    MACRO macroAlias="Snippet" snippetid="1047" />

    How can I get it to render #1047 Snippet using the predefined Snippet macro?


    EDIT: found this and works for my needs...

    [quote=scott.m]EDIT

    Well I tried this and it worked for me:
    [code]

    [/code]
    bodyText is a RTE property with both text and a macro embedded in it. Worked perfectly. And meant I didn't have to do all the code above. I'm using 3.0.5 (hopefully, did an upgrade which I have no idea of know if it worked).

    I think my way is the quickest and cleanest way to render out an embedded macro in XSLT.[/quote]

    Original Thread

  • Tom Maton 387 posts 660 karma points
    Mar 15, 2009 @ 21:59
    Tom Maton
    0

    Did any find out if this is a bug or not?

    If so was there a patch for it?

    Tom

  • Niels Kristiansen 166 posts 382 karma points
    Apr 28, 2009 @ 01:37
    Niels Kristiansen
    0

    Maybe this article could help you out:
    http://forum.umbraco.org/yafpostst7835Help-for-Slideshow-solution-and-how-to-make-1-or-more-sidebars-SOLVED.aspx

Please Sign in or register to post replies

Write your reply to:

Draft