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
    Mar 13, 2013 @ 17:13
    Jeric
    0

    Using DynamicNode in C# without using GetCurrent()

    I need to create something similar to

    dynamic model = new umbraco.MacroEngines.DynamicNode(umbraco.NodeFactory.Node.GetCurrent());

    Is there anyway to use the DynamicNode where I've only got the Id of a Node without using the GetCurrent() function?

    Any help will be great.

    Thanks

     

  • Jeroen Breuer 4908 posts 12265 karma points MVP 5x admin c-trib
    Mar 13, 2013 @ 17:53
    Jeroen Breuer
    100

    Try this:

    dynamic model = new umbraco.MacroEngines.DynamicNode(new umbraco.NodeFactory.Node(id));

    or

    dynamic model = new umbraco.MacroEngines.DynamicNode(id); 

    Jeroen

  • Jeric 122 posts 192 karma points
    Mar 13, 2013 @ 18:30
    Jeric
    0

    Thanks Jeroen, it works :D

     

Please Sign in or register to post replies

Write your reply to:

Draft