1

I tried to order, movenode position in quick launch. Is there any alternative ways to do so?

    private void MoveNodeToPosition(int positionToMoveTo, int postionInTarget, SPWeb localWeb)
          {

             var ql = localWeb.Navigation.QuickLaunch;
             if (positionToMoveTo == postionInTarget) return;
             if (positionToMoveTo == 0)
             {
                  localWeb.AllowUnsafeUpdates = true;
                  ql[postionInTarget].MoveToFirst(ql);
                     localWeb.Update();
                    return;
             }            
                if (positionToMoveTo < ql.Count)
                {
                //positionToMoveTo = positionToMoveTo - ql.Count;
                localWeb.AllowUnsafeUpdates = true;
                 ql[postionInTarget].Move(ql, ql[positionToMoveTo - 1]); 
                 localWeb.Update();
             }
         }
1

1.Go to Root Site in Web Application

2.Site Action->Look and feel->Quick launch->change order

  • I want to do it programmatically. – Binod Feb 26 '14 at 7:15

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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