Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

I will be using a standard asp.net menu control instead of sharepoint menu and sitemapproviders etc. I am developing a user control/webpart containing this menu, i am populating the data(all sites and subsites in the site collection) with object model. And i will places this menu control in masterpage.

Is there anything that is against any best practices?

Thanks.

share|improve this question

1 Answer 1

up vote 0 down vote accepted

Besides the fact that you are essentially disabling the end user's ability to customize the navigation through the UI, the only real issue I could see with this is performance. Iterating through all of the SPWeb objects will not be as efficient as using the OOTB site map provider. I would urge you to build in some sort of caching strategy. Also, you will need to account for the fact that not all users will have access to all sites within the collection. Another approach might be to add a "WebCreating" event receiver to insert an item in a list within the root site and build the navigation from that. At least that way users could remove or edit individual items, and even add links directly to external Urls. I could probably give a better answer if you explained why you need to build a custom control for navigation.

Also, do not be attempted to implement your object model accross site collections unless you plan to implement a timer job that will build the site map (and export it to something like xml).

share|improve this answer
    
Hello, actually this is why i need custom control for navigation: sharepoint.stackexchange.com/questions/47024/… Thanks –  ozdogan Oct 3 '12 at 17:15

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.