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 288 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 3074 posts 13631 karma points MVP 11x 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 6147 posts 24056 karma points MVP 8x 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

Please Sign in or register to post replies

Write your reply to:

Draft