Copied to clipboard

Flag this post as spam?

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


  • Soeren Sprogoe 575 posts 259 karma points
    May 07, 2009 @ 21:47
    Soeren Sprogoe
    0

    RenderTemplate creates DIV-tags around macros

    Hi everyone,

    I have a problem with RenderTemplate in Umbraco v3.0.6.

    I use it to render a template that contains a couple of macro's. But for every macro or page field in the template it wraps it in a div, which looks like this:

    [code]

    '" style="border: 1px solid #009;">Vi har hermed registreret følgende ordre.[/code]

    Why does it do this? And is there any way to avoid it?

    /SoerenS

  • Daniel Lindstrom 454 posts 271 karma points
    May 08, 2009 @ 09:28
    Daniel Lindstrom
    0

    Sorry really can't help out, but can at least tell you that this doesn't happen in v4.0.1. I've used renderTemplate also on v3x and cant remember seeing this issue, but it might be my memory failing.

  • Soeren Sprogoe 575 posts 259 karma points
    May 08, 2009 @ 10:13
    Soeren Sprogoe
    0

    Fixed it, and apparently there's a bug in RenderTemplate:

    If you call it without a template id, ie. RenderTemplate($nodeId), it wraps macro's in DIV's.

    If you call it WITH a template id, ie. RenderTemplate($nodeId, 1212), it works without problems.

    Daniel, do you mind doing a quick test to see wether this is true in v4 also? So we can get it reported as a bug?

    /SoerenS

  • Daniel Lindstrom 454 posts 271 karma points
    May 08, 2009 @ 10:15
    Daniel Lindstrom
    0

    [quote=SoerenS]
    Daniel, do you mind doing a quick test to see wether this is true in v4 also? So we can get it reported as a bug?

    /SoerenS[/quote]

    Will test later today and report back.

  • Comment author was deleted

    May 08, 2009 @ 10:18

    Don't think this will be the same in v4 since it uses a different approach to render the output

  • Soeren Sprogoe 575 posts 259 karma points
    May 09, 2009 @ 15:35
    Soeren Sprogoe
    0

    I've taken the liberty of creating an issue on it:
    http://umbraco.codeplex.com/WorkItem/View.aspx?WorkItemId=22325

    Not sure if it is worth the time to fix it though, if it is not a problem in v4. But atleast now it has been reported.

    /SoerenS

Please Sign in or register to post replies

Write your reply to:

Draft