Changing sitefinity backend root node name from Sitefinity to admin
Hi,
I've changed the Sitefinity Backend pages root node name from "Sitefinity" to "admin" with the idea of trying to access the login or admin pages using http://localhost:60876/admin etc structure.
But I'm getting the following once I try the /admin link:
The resource cannot be found.
Description: HTTP 404. The resource you are looking for (or one of its dependencies) could have been removed, had its name changed, or is temporarily unavailable. Please review the following URL and make sure that it is spelled correctly.
Requested URL: /admin/
I can access the normal admin pages if I browse to localhost:60876/Sitefinity.
The problem is, I can no longer access Administration > Backend Pages (localhost:60876/.../BackendPages) anymore and getting the above 404 error.
I cannot change the link back to Sitefinity either ie. localhost:60876/.../BackendPages
Update: I can only access Dashboard page and none other admin pages.
Can you tell me how I can revert it back to the way it was please.
Thanks.
Hello May,
You can change the name programmatically. Please take a look at Modifying Page Properties
Regards,
Ivan Dimitrov
the Telerik team
Could you explain more where to place the function please?
I've changed the "Backend Page" node and not the custom created pages. Please see attached image.
Now I cannot access any of the admin pages except the dashboard.
Hello May,
You can run the code from a simple aspx page added to the root of the website.
Kind regards,
Ivan Dimitrov
the Telerik team
I've added .aspx page in the project root and the following in the page load event
App.WorkWith()
.Pages()
.Where(p => p.Page.HtmlTitle == "admin")
.Where(p => p.Page.Status == ContentLifecycleStatus.Live)
.ForEach(p =>
p.Page.Title = "Sitefinity";
p.Page.HtmlTitle = "Sitefinity";
)
SaveChanges();
Line 34: App.WorkWith()
Line 35: .Pages()
Line 36: .Where(p => p.Page.HtmlTitle == "admin")
Line 37: .Where(p => p.Page.Status == ContentLifecycleStatus.Live)
Line 38: .ForEach(p =>
|
Hi May,
The "p" object is null. The HtmlTile is not null. You get all pages with Pages(), so you can see the actual title from the returned items.
All the best,
Ivan Dimitrov
the Telerik team
Yes, I've tried that, listing all the pages to see the titles but those pages does not include all the backend pages.
I cannot find "Sitefinity" or "admin" in the list at all.
Hi May,
App.WorkWith().Pages() includes all pages. If you want to get only the backend or frontend you can use