Copied to clipboard

Flag this post as spam?

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


  • Tony Kiernan 278 posts 341 karma points
    Jun 29, 2012 @ 13:38
    Tony Kiernan
    0

    Getting DynamicNodeList from a common functions file

    I'm using a specific set of nodes in several places on my site.  I'ds like to drop the logic for them into my common functions file.  My think ing would be something like this

     

    public static DynamicNodeList news(int pageId)
    {
    DynamicNodeList returnValue = new DynamicNodeList();
    returnValue = Model.NodeById(pageId).AncestorOrSelf(1).Descendants("News");
    return returnValue;
    }

    Calling

    var news - Common.news(Model.Id);

    This is not working at all

  • Tony Kiernan 278 posts 341 karma points
    Jun 29, 2012 @ 13:45
    Tony Kiernan
    0

    or course


            DynamicNodeList returnValue = new DynamicNodeList();
            dynamic node = new DynamicNode(pageId);

            returnValue = node.AncestorOrSelf(1).Descendants("News");

    I knew that (why does delete not work here?)

Please Sign in or register to post replies

Write your reply to:

Draft