protected void GetPages() { CheckInitialized(); Publication publication = GetPublication(); Filter filter = new Filter(); filter.Conditions["ItemType"] = ItemType.Page; filter.Conditions["Recursive"] = true; filter.BaseColumns = ListBaseColumns.Extended; filter.AdditionalColumns.Add("url"); RepositoryItemsFilter pageFilter = new RepositoryItemsFilter(filter, publication.Session); XmlElement orgItems = publication.GetListItems(pageFilter); /* * XmlNodeList itemElements = orgItems.SelectNodes("*"); * List<ListItem> result = new List<ListItem>(itemElements.Count); * foreach (XmlElement itemElement in itemElements) * { * ListItem sg = new ListItem(itemElement); * result.Add(sg); * } */ XmlDocument doc = new XmlDocument(); doc.AppendChild(doc.ImportNode(orgItems, true)); MPackage.PushItem("Pages", MPackage.CreateXmlDocumentItem(ContentType.Xml, doc)); }