November Happy Hour will be moved to Thursday December 5th.

Custom property to see child pages?

Vote:
 

I am currently tearing out my hair with this. I want to create a custom control which is a drop down list contining the page ids and page names of all pages below the page with the property.

to put it in context i have a section page with articles under it, I want this control so I can select an article through the drop down list on the section page, the section page will then have the page id of teh selected page so information from the article can be pulled through on to the section page.

 I hav etried creating a newslist and getting the children from it, I have tried creating a pagedatacollection passing it the pagereferance.selfreferance but I can get anythign working?

#20132
May 21, 2008 15:48
Vote:
 

Managed to get this working with the following code

protected override void SetupEditControls()

{

PageReference pageRef = new PageReference(CurrentPage.PageLink.ID);

foreach (PageData page in new PageList().GetChildren(pageRef))

{

AddItem(page);

}

}

#20133
Edited, May 21, 2008 16:27
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.