I was asked to prove the power of the new framework that was released in version 2.3 of Insite Creation CMS. Below you will find a download of a module that took me literally 10 minutes to write and it is fairly self explanitory. I am using the asp.net Treeview control but you can actually use a repeater and tie some Jquery to it if you so well choose but this will give you the idea how simple it is to get the pages out of insite creation without writing you sql and getting the information out of the database with a DataReader or whatever you normally use.
 
Sample of recursion
private void PopulateControls() 
{
Int32 rowCount = new Int32();
List listing = new InsiteListing().GetListing(this.RootID.ToString(), 0, 200, ref rowCount);
foreach (InsiteListingPage root in listing)
{
TreeNode rootNode = new TreeNode(); rootNode.Text= root.title; 
rootNode.Value=root.page_id.ToString(); 
tvSiteMap.Nodes.Add(PopulateChildren(rootNode)); 
} 
} 

private TreeNode PopulateChildren(TreeNode node) 
{ 
TreeNode childNode = node; Int32 rowCount = new Int32(); 
List listing = new InsiteListing().GetListing(childNode.Value, 0, 200, ref rowCount); 
if (listing.Count > 0) 
{
foreach (InsiteListingPage childPage in listing)
{
TreeNode newChildTreeNode = new TreeNode(); 
newChildTreeNode.Text = childPage.title; 
newChildTreeNode.Value = childPage.page_id.ToString(); 
childNode.ChildNodes.Add(PopulateChildren(newChildTreeNode)); 
} 
} 
else 
{ 
return childNode; 
} 
return childNode; 
} 

Screenshot:

Download
SiteMapWithListing.ascx.zip
File Size: 958 bytes