What i once did for a customer is simply query a pages library. I then created a secondary navigation list with all the navigation items which existed and did a lookup to get all the data. Because of permissions on the pages in the pages list I only retrieved items which were relevant to the user.
List<Navigatie> navigatieItems = new List<Navigatie>();
Navigatie nav = null;
SPWeb web = SPContext.Current.Web;
//get pages list
SPList pagesList = web.Lists[Constants.ListNames.Pages];
//get pages items
var items = from SPListItem tItem in pagesList.Items
orderby tItem.ID
ascending
select tItem;
//get navigation list items
IQueryable<Navigatie> all = factory.Navigatie.All.OrderBy(x => x.Volgorde);
foreach (Navigatie item in all)
{
foreach (SPListItem menuItem in items)
{
if (item.Title == menuItem.DisplayName)
{
nav = new Navigatie();
nav.Title = item.Title;
nav.Navigatieurl = item.Navigatieurl;
navigatieItems.Add(nav);
}
}
}
return navigatieItems.AsQueryable();
After this bind it to an aspmenu
//create aspmenu
menu = new AspMenu();
foreach (Navigatie nav in navigatieItems)
{
string title = string.Empty;
string url = string.Empty;
if (!string.IsNullOrEmpty(nav.Title))
{
title = nav.Title;
}
if (!string.IsNullOrEmpty(nav.Navigatieurl))
{
url = nav.Navigatieurl;
}
item = new MenuItem(nav.Title, null, null, url);
if (pageViewed == item.Text)
{
item.Selected = true;
}
menu.Items.Add(item);
}
Controls.Add(menu);
Don't know if this is helpfull in your particular case. If not let me know I will look for something else.