Copied to clipboard

Flag this post as spam?

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


  • DotNetFun 2 posts 22 karma points
    Jan 14, 2010 @ 19:34
    DotNetFun
    0

    How can I retrieve ALL Content nodes?

    For example, let's say these are my content nodes:

    Content
         Homepage
         About Us
         Products
         Etc.

    What XPath code will get me all of the Content nodes? Thanks.

     

  • Paul Blair 466 posts 731 karma points
    Jan 14, 2010 @ 20:16
    Paul Blair
    0

    ./ancestor::root/node

  • Dirk De Grave 4537 posts 6006 karma points MVP 3x admin c-trib
    Jan 14, 2010 @ 20:25
    Dirk De Grave
    0

    ... or

    umbraco.library:GetXmlAll() 

    if your working from xslt and

    umbraco.presentation.nodeFactory.Node topNode = new umbraco.presentation.nodeFactory.Node(id);
    //think you need to pass -1 to get all nodes from the content tree

    if working from .net c# code

    Hope this helps.

    Regards,

    /Dirk

     

     

  • DotNetFun 2 posts 22 karma points
    Jan 14, 2010 @ 20:31
    DotNetFun
    0

    That worked. Thanks!

  • 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