ASPX Page Template not showing in Kentico 9 Administration.

Manmath Kulkarni asked on January 25, 2017 12:40

Hi Guys,

I have web site running with master page type as portal engine but I want to create aspx master page template to implement functionality in code behind.

I have following queries.
1. To create aspx Page template do I need to have aspx master page template because while creating aspx page you need to select Master page for it.
2. I have created ASPX master page template according to this link.

But I am not able to select Master page template in template type "ASPX" & "ASPX + Portal Page", as Master page template created using Visual Studio is not showing in Kentico administration Page templates.

Can you please help into this.

Thanks in advance.

Correct Answer

Trevor Fayas answered on January 25, 2017 15:36

You can't select a ASPX Master template. This is the downfall of the ASPX+Portal method, you have no control over the master template through the portal, only the individual pages underneath. Ran into major headaches with this because your master often includes your header/footer, which then means you have to create it with code.

My recommendation is to NOT do aspx+portal. You can implement code behind logic without using ASPX in one of two ways.

  1. Put your code behind logic in a Control (ascx) and add that to your master page template. Keep in mind you can add values and functionality to the Macro Engine to use this elsewhere on the page then.
  2. The "Layout" of a page template has the type of ASCX so you can add controls, AND add server side scripts. So you can add a Server side script to your master template through the portal and add any needed logic there.

I would do this before going aspx+portal. But that's me personally, i hate ASPX/ASPX+Portal as requires you to go into code to make changes you shouldn't need to.

0 votesVote for this answer Unmark Correct answer

Recent Answers

MMT Digital answered on January 25, 2017 13:15 (last edited on January 25, 2017 13:16)

0 votesVote for this answer Mark as a Correct answer

Ilesh Mistry answered on January 25, 2017 13:16 (last edited on January 25, 2017 13:16)

Hi Manmath

To answer some of your queries...

1) yes you would need to create a Master page aspx

2) What does it show up on the screen where your trying to select the template type? Can you provide a screenshot please?


0 votesVote for this answer Mark as a Correct answer

Manmath Kulkarni answered on January 25, 2017 13:23

Hi Ilesh,

Thanks for your reply.

Its not showing any file their though file is present in folder structure and can be opened from Visual Studio. Its showing "There are no files to display."

Even for Corporate site example there is "Root.master" file is also not showing up in Kentico administration. This file also inherits from TemplateMasterPage class.

0 votesVote for this answer Mark as a Correct answer

   Please, sign in to be able to submit a new answer.