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:
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