Copied to clipboard

Flag this post as spam?

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


  • Damon 217 posts 287 karma points
    Aug 21, 2015 @ 08:37
    Damon
    0

    Whats the difference between using Library.NodeById(1052); and Umbraco.Content(id) ?

    Hi,

    can someone explain the difference please:

    Library.NodeById(1052); and Umbraco.Content(id) ?

    Is there an advantage here?

    Thanks,

  • Jeavon Leopold 3008 posts 13221 karma points MVP 7x admin c-trib
    Aug 21, 2015 @ 08:44
    Jeavon Leopold
    3

    Hi Damon,

    Library.NodeById is obsolete (it was part of the first Umbraco Razor implementation called DynamicNode), you should always use methods from the Umbraco helper such as Umbraco.Content

    Jeavon

  • Alex Skrypnyk 5908 posts 22603 karma points MVP 4x admin c-trib
    Aug 21, 2015 @ 10:25
    Alex Skrypnyk
    0

    Hi Damon,

    Also you can use Umbraco.TypedContent() at the frontEnd, in your razor views, it's much faster then Umbraco.Content().

    Read more here: https://our.umbraco.org/documentation/Reference/Templating/Mvc/querying

    Thanks, Alex

  • 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