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 4861 posts 12138 karma points MVP 3x 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

     

  • 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