views:

155

answers:

0

Hi, I have a Sharepoint 2007 website. As you know,in settings users can order the sites and pages as they want in exploration, and then you can get these items with this order with:

SPWeb web = CurrentSite.OpenWeb(currentSite);
 SPNavigation nav = web.Navigation; 
 SPNavigationNodeCollection nodeColl = nav.QuickLaunch;

The problem is that when you add a site or page, this SPNavigationNodeCollection does not refresh automatically.

You will also notice a very weird behavior of SharePoint that as soon as you open the “Navigation” page in the UI of that site and make any change and save it – since that change all items suddenly appear in the navigation collection as you expected them to from the beginning!

Can you give any solution to automatize all this? It is not practic to enter exploration everytime you create a site or page?

If there is another way with CAML to get the pages/sites order by the user, that would be great too.

it is also treated in this article but i am not convinced: http://kwizcom.blogspot.com/2007/08/manage-publishing-page-nodes-in-site.html