November Happy Hour will be moved to Thursday December 5th.

Attach custom page under some already existing page

Vote:
 

I have followed this https://world.episerver.com/blogs/Daniel-Ovaska/Dates/2016/6/creating-a-custom-login-page/ 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

#184693
Edited, Nov 02, 2017 11:14
Vote:
 

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: https://world.episerver.com/documentation/Items/Developers-Guide/Episerver-CMS/75/Content/Attributes/

#184782
Nov 03, 2017 13:03
Vote:
 

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

#184784
Nov 03, 2017 13:39
Vote:
 

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

#184788
Nov 03, 2017 14:12
Vote:
 

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?

#184789
Nov 03, 2017 14:14
Vote:
 

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.

#184791
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.