Take the community feedback survey now.
Take the community feedback survey now.
 
                I would use FindPagesWithCriteria. Something like this:
var criterias = new PropertyCriteriaCollection();
 
            var pubCriteria = new PropertyCriteria();
            pubCriteria.Condition = CompareCondition.Equal;
            pubCriteria.Name = "PagePendingPublish";
            pubCriteria.Type = PropertyDataType.Boolean;
            pubCriteria.Value = false.ToString();
            criterias.Add(pubCriteria);
PageDataCollection matches = Global.EPDataFactory.FindPagesWithCriteria(CurrentPage.PageLink, criterias);
Hope it helps.
Frederik
this helps a great deal... I have a place to start for sure.
would I add the boolean property "PagePendingPublish" to each child page I wish to publish?
Cheers,
Chris
PageDataCollection pageColl = DataFactory.Instance.GetDescendents(yourStartingPage.PageLink);
Then you can filter the result afterwards if you want to.
Andreas
If you are using CMS 5 and above, you can use nested foreach loops to get down to the child of child pages. First loop go over the children, nested one go over the children of children.
here is a sample code
  //get the page reference to start page
         PageReference productStartPage =   CurrentPage.Property["ProductStartPage"].Value as PageReference;
            //get the children
            PageDataCollection products = GetChildren(productStartPage);
    
        //loop through children    
            foreach (PageData product in products)
            {
        
              //get page reference to that chidren page    
              PageReference currentProduct = product.PageLink
        
        //get child pages for the current children page or grandchildren of start page
               PageDataCollection childproducts = GetChildren(currentProduct);
            //loop through them
                        foreach (PageData child in childproducts)
                        {
                            //find the relvant product
                            if (child.PageName == ProductDropDownList.SelectedItem.Value)
                            { 
                    //do somthing
                }
            }
       }
 
    
    
    
Hi,
I need to display content in boxes from children pages. The pages I want to collect data from are children of child pages... how would I access pages farther down in the node tree than immediate children?
cheers!