How to Get Child page urls
Hi ,
As per my Requirement, if i pass page page id , i need to Show the Childpage urls
i have reference code but its old version Code .
Now i'm Using Sitefinity 7.0 , please guide me how to write below code in 7.0 version
cmsPage cmsPage = (CmsPage)
new
CmsManager().GetPage((Guid)pageId);
if
(mode == DisplayMode.Page_Body)
this
.doPageMenu(cmsPage.ChildPages, (Guid)pageId);
private
void
doPageMenu(PageBase.Relation__ChildPages nodes, Guid pageId)
StringBuilder sb =
new
StringBuilder();
Telerik.Cms.CmsManager cmsManager =
new
Telerik.Cms.CmsManager();
nodes.Sort(
"Ordinal"
, System.ComponentModel.ListSortDirection.Ascending);
for
(
int
i = 0; i < nodes.Count ; i++)
Telerik.Cms.ICmsPage p = (Telerik.Cms.ICmsPage)nodes[i];
if
(p.PageType != CmsPageType.Group)
sb.Append(
"<li><a href=\""
+
this
.Page.ResolveUrl(p.DefaultUrl.Url) +
"\">"
+ p.MenuName +
"</a></li>"
);
sb.Append(
"</ul>"
);
Thanks & Regards
Ajay reddy
Hi Ajay,
You can find CRUD operations samples for page in the Pages API documentation on that link.
Regards,
Svetoslav Manchev
Telerik