I am working on a sharepoint 2013 enterprise server. and i have the following case:-
1.I created an event receiver which will get fired when an item is updated for the first time.
2.the event receiver will create a new sub-site as follow:-
SPWeb newSite = spCurrentSite.Webs.Add(curItemID, curItemSiteName, "created automatically after adding a new project item", Convert.ToUInt16(1033), webTemplate, false, false);
//2 inherate navigation from parent
newSite.Navigation.UseShared = true;
//3 set its master page to a custom.master
string masterPage = "Custom.master";
var masterUri = new Uri(rootWeb.Url + "/_catalogs/masterpage/" + masterPage);
newSite.MasterUrl = masterUri.AbsolutePath;
newSite.CustomMasterUrl = masterUri.AbsolutePath;
//4 break the permission inheritance
newSite.BreakRoleInheritance(true,true);
//5 remove from this subsite a group named "rootUsersOnly"
SPGroup group = newSite.SiteGroups["rootUsersOnly"];
newSite.RoleAssignments.RemoveById(group.ID);
//update then dispose
newSite.Update();
newSite.Close();
now the above is working well, where the sub-site will be created with the correct settings. but i am facing this problem.
- when the new sub-site is created, there will be a Quick Launch link labeled as "Home" as follow:-
- so can i change this title from "Home" to be equal to the new sub-site's Title inside my event receiver ?
Thanks