AI OnAI Off
I guess the name from the UI overrides whatever default value you provide. I'm not sure how to change the "New Page" in the UI, but it's probably stored in some resource file that you can override. See: https://blog.novacare.no/change-text-in-the-episerver-ui/
Another option is hooking into the CreatingContent event: see https://world.episerver.com/blogs/Daniel-Ovaska/Dates/2019/6/content-events-in-episerver/
private void Events_CreatingContent(object sender, EPiServer.ContentEventArgs e)
{
if (e.Name == "New Page")
{
e.Content.Name = "This works!";
}
}
Using this aproach you will see "New Page" until you click "Create". When the new page is created, you will see your overridden page name.
I was googling and trying some code myself, but didn't find anything that would work :/
How to customize the name of the new page created in the UI:
I'd like to change New Page to something I set in the Page Type.
Tried this in SetDefaultValues():
But is seems it doesn't have any impact.