Try our conversational search powered by Generative AI!

Attach custom page under some already existing page


I have followed this tutorial to create a custom login for my application. 

What I want is to attach this page to start page some how so that I don't have to go into the admin/edit part and create from there. I don't people to be able to create multiple pages under this template. 

Because right now it comes in the edit panel as a new page type. I don't want that. Its going to be one page

Edited, Nov 02, 2017 11:14

Create and attach it to the start page from code in a migration and provide the ContentTypeAttribute with AvailableInEditMode=false option to hide it.

More info here:

Nov 03, 2017 13:03

Thanks Erik, but thats the issue I am having where in code to put it? Where in the migration?

Nov 03, 2017 13:39

Create an instance of your class and set parent to ContentReference.StartPage and save it through the ContentRepository.Save function?

Nov 03, 2017 14:12

Yeah I get that part but where in the EpiServer should I create an instance for it? Should I just make an controller action and call it or should I do something else?

Nov 03, 2017 14:14

We normally setup our own migration service to run all our one-time changes and have an initialization module trigger it, but i am not sure if there are any built-in support in episerver for it.

Nov 03, 2017 14:34
This topic was created over six months ago and has been resolved. If you have a similar question, please create a new topic and refer to this one.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.