• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 431
  • Last Modified:

Broke site navigation-SharePoint 2007

I was trying to change my site navigation settings.  I added a shortcut to a new file in the /../../directory/file.aspx form without issue.  Now I get a "cannot use a leading .. to exit above the top directory" error.  And a bigger problem, my site navigation bar is broken so I can't undo what I did before.  Help.
error.png
0
IntercareSupport
Asked:
IntercareSupport
  • 3
1 Solution
 
SharePointGirlCommented:
$SPSite = New-Object Microsoft.SharePoint.SPSite("http://localhost:1000/sites/demo");  
$web = $SpSite.OpenWeb("webname");    
     
   

   $nodes = $web.Navigation.QuickLaunch;      
 foreach($node in $nodes)      
 {            
         if($node.Title -eq "Lists")          
  {                   $     $node.Children.Delete($navNode);            
}      
}      
$web.Dispose();  
$SPSite.Dispose();

0
 
SharePointGirlCommented:
Soz it submitted while I was trying to format the text.

By using powershell you can get round the fact you don't have access to the site.


$SPSite = New-Object Microsoft.SharePoint.SPSite("http://localhost:1000/sites/demo");  
$web = $SpSite.OpenWeb("webname");    
     
   

 $nodes = $web.Navigation.QuickLaunch;      
 foreach($node in $nodes)      
 {            
         if($node.Title -eq "Lists")          
        {                  
              $node.Delete($navNode);            
         }      
}      
$web.Dispose();  
$SPSite.Dispose();
0
 
SharePointGirlCommented:
You can still use powershell with 2007 but you need to follow these instructions

http://nickgrattan.wordpress.com/2007/09/03/preparing-powershell-for-sharepoint-and-moss-2007/
0
 
IntercareSupportAuthor Commented:
I actually was unable to test if this works, because I was under the gun and found another way around this (slash and burn-revert from old backup-yuck).  Thanks.
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now