Reg: Kentico Portal Master Template + ASPX Page Template

Srinivasa Rao Potnuru asked on September 18, 2017 17:06

Hi,

I’ve created new site with master template as Kentico portal template. I am able to create new pages with Kentico portal template in the same site.

I have a requirement to create new page with APX + Portal template. So I have created new web form with name TVGuidePageTemplate.aspx in CMS/CMSPages and registered this TVGuidePageTemplate with name as “TV Guide Page Template” in Kentico Page templates using ASPX+ Portal option.

If I try to create new page with template “TV Guide Page Template”, it is throwing error "[CMSWebPartZone.PagePlaceholder]: Parent CMSPagePlaceholder not found.". Request you to kindly help to resolve the issue.

Please let me know whether it is possible to create new page with Portal Master Template + (ASPX + Portal) Page Template in the site.

Thanks, Srinivas

Recent Answers


Trevor Fayas answered on September 18, 2017 18:44 (last edited on September 18, 2017 18:45)

It is not possible to use an ASPX+Portal page to my knowledge with a portal master template.

The 'benefit' of an ASPX portion is that you can define your various page methods (such as the Page_Load, OnInit, etc). However this is completely unnecessary as you can do the same in a purely Portal page template.

There are 2 ways to do this:

1: In the "Layout" of the Portal Page Template, you can insert a script tag and put in your content as you normally would. Just make sure the Layout type is "ASCX"

Your page template content here
<script runat="server">
protected override void OnInit(EventArgs e)
{
  base.OnInit(e);
  // Your own custom logic here
}
</script>

2: Create a custom control (ASCX) that contains your logic / output, and either turn it into a webpart or use the "Custom Control" web part and point to the file.

With these two things, you can do anything you could do with an ASPX or ASPX+Portal page without the actual ASPX.

0 votesVote for this answer Mark as a Correct answer

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