Copied to clipboard

Flag this post as spam?

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


  • Jeric 122 posts 192 karma points
    Oct 27, 2013 @ 23:56
    Jeric
    0

    Traversing the Media Node Tree in MVC

    I'm building a new project in MVC, so still kind of new with all the stuff.

    Currently I need to loop through a node within the Media Node Tree. Eg NodeId 4378

    How do you do this in the new MVC. I've tried to use

    var test = UmbracoContext.Current.MediaCache.GetById(4378)
    

    But I can't get anything out of test.Children at all (even though the children exist).

    I'm currently using the old way as below:

    var test = new DynamicNode(4378);
    

    Any idea how this can be done in MVC?

    Any help will be appreciated

    Thanks

Please Sign in or register to post replies

Write your reply to:

Draft