Copied to clipboard

Flag this post as spam?

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


  • Arie 224 posts 675 karma points
    Feb 02, 2013 @ 20:44
    Arie
    0

    6.0.0: GetProperty function changed?

    I upgraded a site from 4.11.1 to 6.0.0 and I was seeing the following in the HTML output:

    <img src="umbraco.MacroEngines.PropertyResult" width="124" height="83" style="border:1px gray solid;" />

    Here's the corresponding Razor code :

    <img src="@node.GetProperty("lineCardLogo")" width="124" height="83" style="border:1px gray solid;" />

    Interestingly, if I access "lineCardLogo" directly it works just fine.

    Razor:

    <img src="@node.lineCardLogo" width="124" height="83" style="border:1px gray solid;" />

    HTML Output:

    <img src="/media/4535/cbi_electric.png" width="124" height="83" style="border:1px gray solid;" />


  • Jan Skovgaard 11280 posts 23678 karma points MVP 11x admin c-trib
    Feb 02, 2013 @ 22:08
    Jan Skovgaard
    0

    Hi Arie

    I'm not a Razor wizzard yet but in the upgrade notes for 4.10 it says that the GetProperty method now returns an object. So I guess that is also true when using it in Razor.

    Hope this helps.

    /Jan

  • Arie 224 posts 675 karma points
    Feb 02, 2013 @ 22:10
    Arie
    0

    But it worked in 4.11.1...

    (By the way, I tried to delete this topic since it's a duplicate.)

  • Jan Skovgaard 11280 posts 23678 karma points MVP 11x admin c-trib
    Feb 02, 2013 @ 22:14
    Jan Skovgaard
    0

    Hmm, ok then I'm probably wrong about my assumption :) - Yes I saw the second post right after I replied this one...duplicates happen :)

    /Jan

Please Sign in or register to post replies

Write your reply to:

Draft