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 have very similar situation to

re-ordering navigation for quick launch section

I have about 6 links that is under the quick lunch. I only 3 headings. These 6 links will go under the "Project Management" heading.

The last line node.MoveToLast does not resolve because it wants the whole navcollection. How can I handle this?

share|improve this question
add comment

1 Answer

up vote 2 down vote accepted

Yes, MoveToLast() requires an SPNodeCollection be passed in as the parent. Fortunately, each node in the QuickLaunch has a Children property which is the node collection that you need.

Please refer to re-ordering navigation for quick launch section for the code sample you can use.

share|improve this answer
    
@Laurie: You ROCK GIRL...... Thanks. I will let you how it went. Thanks a lot..... Robi –  Robert G Jun 2 '11 at 3:39
    
@Hey there: the 6 links under the main navigation did not move to "Project" header area. –  Robert G Jun 2 '11 at 3:56
    
I recommend setting a breakpoint and stepping into the code to see where it's failing. It could be a spelling error on the heading name or something. –  Laurie Jun 2 '11 at 4:08
    
@Laurie: It goes through all the lines and does not have any hick-ups. I have 3 headings and they are all populated child. However, I have 6 links directly under the main tree (not under any header) and these needs to be moved to project header. –  Robert G Jun 2 '11 at 4:18
    
Could it be that these 6 aspx pages gets added right before calling this function? I tried adding web.update() before running the updateNavigation routine but no help. –  Robert G Jun 2 '11 at 4:35
show 8 more comments

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.