Copied to clipboard

Flag this post as spam?

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


  • khansaa111 25 posts 55 karma points
    May 14, 2015 @ 13:18
    khansaa111
    0

    Gell all nodes plzzz

    I create a block in every node of my content , and in this block there is a box to check ,

    display the block ?

    so how to gett all nodes which the check box is true ?

    thank you

  • Urvish 252 posts 776 karma points
    May 14, 2015 @ 14:13
    Urvish
    0

    Hi Khansaa111,

    You can get all nodes value using below code by using UmbracoHelper class.

            var umbracoHelper = new Umbraco.Web.UmbracoHelper(UmbracoContext.Current);
            var Node = umbracoHelper.ContentAtRoot();   // Get Root Node
    
            foreach (IPublishedContent root in Node) {
                foreach (var item in root.Children)
                {
                    // here you can get property 
                    item.GetPropertyValue("PropertyAlias");
                }
            }
    

    Hope it will help.

    Regards,

    Urvish Mandaliya

Please Sign in or register to post replies

Write your reply to:

Draft