API
Version 7.x > API > Register an ASPX page as a Page Template programmatically (via API) View modes: 
User avatar
Member
Member
Luca - 10/15/2013 5:02:20 AM
   
Register an ASPX page as a Page Template programmatically (via API)
Hi,

Is there a way to register an ASPX page as a Page Template via API?

I'd like to do it beacuse i need to deploy specific page template on specific Kentico installations of the same project (My machine, Test environment, Production, etc.)
and don't want to register pages by hand every time.

thanks

User avatar
Kentico MVP
Kentico MVP
Brenden Kehren - 10/15/2013 7:19:02 AM
   
RE:Register an ASPX page as a Page Template programmatically (via API)
Luca,

Check out the code in the CMSModules/PortalEngine/UI/PageTemplates/PageTemplate_New.aspx.cs page. The button click event should have everything you need to get a template created via API.

Brenden