Confusion around ASPX+portal template

Tom Troughton asked on September 18, 2015 18:11

Can someone please clarify something about aspx+portal templates? I was sure that previously when I added such a template, the Design tab in the Page Templates module would expose the zones I'd added to the webform so I could add default web parts.

However I'm now finding that although these templates work in that when creating pages (I see my zones on the Design tab in the Pages module), when in the Page Templates module I can only see the green bar at the top (saying "/Design - page template: [template name]".

Is this expected behaviour? I can even see other templates on the same instance which on the Design tab in Page Templates show the zones I've added to the webform. See screenshots below. It's driving me crazy. I need to create ASPX+portal templates with web part zones and add some default web parts to these zones. What am I doing wrong? My master page has the necessary CMSPortalManager controls and my template uses the CMSPagePlaceholder control to add the zones as per docs.

UPDATE: I've now noticed that if I create two pages using my template and add a web part to one of my ASPX+portal zones, I see the same web part on both pages as expected. Then if I go back to the Page Templates module I can now see the zone (marked as "Not in layout" and the web part I added. Is this expected behaviour? I'm finding this very confusing. If I want to add default web parts to an ASPX+portal template do I have to create a page based on that template first?

Here's a template where I see the zones in Design mode on Page Templates module:

test

Here's my newer template which is empty on the Design tab:

Image Text

Recent Answers


Maarten van den Hooven answered on September 18, 2015 18:34 (last edited on September 18, 2015 18:37)

Hi Nat,

I don't see the layout of the template but probably this is empty. The reason that you see the zones is because the zones have been there and are now missing. Why I don't know. That's why you see the sentence "not in layout". If you go to the design tab in template module you can change the code if you add the zones with the same codename it will restore the Web parts and zones. Or when you have versioning activated you can also rollback to the orginal version.

If this answer helped you, please vote for my answer :-)

0 votesVote for this answer Mark as a Correct answer

Tom Troughton answered on September 18, 2015 18:43

Hi Maarten. Thanks for responding. However, I'm asking about ASPX+portal model so there is no 'layout'. Please see my Update in my question for additional info.

0 votesVote for this answer Mark as a Correct answer

Timothy Fenton answered on September 18, 2015 19:44

Hello Nat

Thanks for sending in this question, I have actually submitted this as a possible bug to our developers. It appears that the LayoutTemplate does not get read in the Page Templates application, instead it renders the ASPX/ Portal engine mixed type as a normal portal page. You can even see this by clicking the edit layout button in the design tab and then adding a webpartzone in the UI. It does not add the webpart zone to the template, instead it adds it to the page template item in the database. I have sent in a bug report to see if this is by design, not yet implemented or some kind of bug here.

Thanks!

1 votesVote for this answer Mark as a Correct answer

Maarten van den Hooven answered on September 18, 2015 20:18

Hi Nat, Ok sorry I was the wrong track. Than I agree with Timothy and it seems like an Kentico bug. Good luck and have a nice weekend.

0 votesVote for this answer Mark as a Correct answer

Timothy Fenton answered on September 21, 2015 21:04

Hello again Nat

Just got a reply back from the developers on this issue. First it is a usability issue rather than a bug, this is an issue they have already fixed for version 9 release, because it required rewriting a significant chunk of the UI here. As it is a usability issue it will not be fixed in a hotfix, but you will see the change in the version 9 release. For now they recommend editing the template the way you have been, through the Pages application on a page that has the template applied to it.

Thanks!

1 votesVote for this answer Mark as a Correct answer

Maarten van den Hooven answered on September 21, 2015 21:46 (last edited on September 21, 2015 22:07)

Hi Timothy, thanks for the update!!!!

0 votesVote for this answer Mark as a Correct answer

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