Copied to clipboard

Flag this post as spam?

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


  • Nauman 98 posts 118 karma points
    Mar 17, 2010 @ 07:21
    Nauman
    0

    get top / parent nodes

    How can I get topnodes for following nodes in content.

    Site1

    • index
    • about

    Site2

    • index
    • about

     About

    • index
    • about

     

    I want to get "Site1" and "Site2" and "About" in one of my c# code? I have done following to acheive this

    var rootNodes = new umbraco.presentation.nodeFactory.Node(-1).ChildrenAsTable();                   
    sl.DataSource = rootNodes;
    sl.DataTextField = "NodeName";
    sl.DataValueField = "Id";
    sl.DataBind();

    The problem is this only gets "Site1" and "Site2" in drop down and not getting "About". What could be the issue?

    PS: "Site1" and "Site2" are based on one doctype and "About" is based on other. I have published and checked everything in umbraco.

    Regards

    Nauman

  • Bas 3 posts 24 karma points
    Mar 15, 2012 @ 14:40
Please Sign in or register to post replies

Write your reply to:

Draft