Copied to clipboard

Flag this post as spam?

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


  • Mr A 216 posts 278 karma points
    Oct 22, 2012 @ 13:39
    Mr A
    0

    uBlogsy.Web.Helpers.NodeHelper' does not contain a definition for 'GetDescendentsOrSelf'

    Hi ,

    I tried to send my own array list to the method GetDescendent in the ublogsy post archive but when i try to save it gives an error , though node helper consist of getdescendent method in the dll. can you tell me where i m getting it wrong ; below is the code which comes p with the error i mentioned in the post title, Thanks

     string[strArrays new string[2];
            strArrays[0"uBlogsyFolderPage";
            strArrays[1"uBlogsyPage";
        
          IEnumerable<DynamicNodedescendentsOrSelf NodeHelper.GetDescendentsOrSelf(1150"uBlogsyPost_NewSection"strArrays);
     List<DynamicNodenodes = descendentsOrSelf.ToList();

     

     

  • Anthony Dang 1404 posts 2558 karma points MVP 3x c-trib
    Oct 22, 2012 @ 16:26
    Anthony Dang
    0

    which version of ublogsy and umbraco are you using?

     

  • Mr A 216 posts 278 karma points
    Oct 22, 2012 @ 16:37
    Mr A
    0

    umbraco v 4.7.1.1 /ublogsy 1.35

  • Mr A 216 posts 278 karma points
    Oct 22, 2012 @ 16:59
    Mr A
    0

    updated the ublogsy dll to 1.3.6 ,still same error

  • Anthony Dang 1404 posts 2558 karma points MVP 3x c-trib
    Nov 01, 2012 @ 00:21
    Anthony Dang
    0

    I forgot to ask exactly what the error was.

     

    I assume this is the original line that you're mimcking?

     var nodes = GetDescendentsOrSelf(nodeId, "uBlogsyPost", new string[] { "uBlogsyFolderPage", "uBlogsyPage", "uBlogsyFolderComments", "uBlogsyComment" });

    If so, it works as follows...
    uBlogsyPost is the nodeTypeAlias that we're looking for.
    The array are the nodeTypeAliases which we know want to stop at... ie if we hit one, don't bother checking its' children.
    Here is the start of GetDescendentsOrSelf
    private static IEnumerable<DynamicNode> GetDescendentsOrSelf(int nodeId, string targetAlias, IEnumerable<string> stopAliases)
            {
                var landing = NodeHelper.GetLanding(nodeId);
    The first line assumes that the landing node is an ancestor of the nodeId you're passing in.
    I hope that helps.
Please Sign in or register to post replies

Write your reply to:

Draft