SitePages link openes Home.aspx
Hello, As it's described in title, when i click on the SitePages link, it opens SitePages/Home.aspx instead of SitePages/Forms/AllPages.aspx. Dose anyone know what could be the issue and how to resolve it? Thanks in advance, Ivan
October 3rd, 2011 8:21am

You can goto "Site Actions-->Site Settings-->Look and Feel-->Navigation-->Navigation Editing and Sorting" to correct it, change the link's url to the right one. If you can't find the "Navigation" setting, please enable the "SharePoint Server Publishing Infrastructure" in your "Site collection features".
Free Windows Admin Tool Kit Click here and download it now
October 3rd, 2011 8:53am

It's not link in the Quick Launch. I'm comming to this link trough All Site Content. Link is pointing to the propper address (http://<servername>/<sitename>/SitePages, but when i click on it, it openes Home.aspx instead of library.
October 3rd, 2011 9:05am

You can rename home.aspx, for example to home1.aspx.
Free Windows Admin Tool Kit Click here and download it now
October 3rd, 2011 9:38am

Hi, ivan it doesnt matter what url unless and untill its not effecting your business need This may be because you have customize your page,so now its an application page in sharepoint Regards Vinit Shah
October 3rd, 2011 10:12am

Create Console Application in visual studio and run this code: sing System; using Microsoft.SharePoint; using System.Diagnostics; class Program { static void Main(string[] args) { using (SPSite site = new SPSite("http://mysharepoint")) using (SPWeb web = site.OpenWeb()) { web.AllowUnsafeUpdates = true; SPFolder f = web.Lists["Site Pages"].RootFolder; f.WelcomePage = "SitePages/Forms/AllPages.aspx"; f.Update(); web.AllowUnsafeUpdates = false; } } }
Free Windows Admin Tool Kit Click here and download it now
October 3rd, 2011 10:13am

Thanks for that BioGeneZ. It worked with a one small change (instead of "SitePages/Forms/AllPages.aspx" i entered "Forms/Allpages.aspx"). Here is the complete code: using System; using System.Collections.Generic; using System.Linq; using System.Text; using Microsoft.SharePoint; namespace ChangeLibraryHomePage { class Program { static void Main(string[] args) { try { Console.Write("Enter site URL: "); string siteUrl = Console.ReadLine(); using (SPSite site = new SPSite(siteUrl)) using (SPWeb web = site.OpenWeb()) { SPList sitePagesLib = web.Lists["Site Pages"]; web.AllowUnsafeUpdates = true; SPFolder f = sitePagesLib.RootFolder; f.WelcomePage = "Forms/AllPages.aspx"; f.Update(); web.AllowUnsafeUpdates = false; } Console.WriteLine("Changes have been successfully applied."); Console.Write("Press Enter to continue..."); Console.ReadLine(); } catch (Exception ex) { Console.WriteLine(ex.Message); Console.Write("Press Enter to continue..."); Console.ReadLine(); } } } }
October 4th, 2011 4:34am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics