Using ASPX + Portal Master Template with webparts

Craig Hazard asked on January 29, 2015 03:43

Hey All,

I am working on a project that requires me to at the very top level (Master Page) to use an ASPX page with multiple WebParts in the Header and Footer of the page.

My master kind of looks like this:

----------------HardCoded Info---------------
------PlaceHolder Containing WebPartZone1----
------PlaceHolder Containing WebPartZone2----
--ASP Content Placeholder For Child Content--
------PlaceHolder Containing WebPartZone3----
------PlaceHolder Containing WebPartZone4----
----------------HardCoded Info---------------

I have managed to create a Master Page at root and I have added WebParts into WebPartZone 2,3 and 4. But what I need to be able to do is create a child page where I can place WebParts into WebPartZone1 and have a custom layout (I will only have 2 different custom layouts) in the ASP Content Placeholder.

I can't seem to get the Child page to inherit the Master template in a way that will let me only fill WebPartZone1 on Child pages and let me add a custom layout into the ASP Content Placeholder.

Is this possible using ASPX+Portal, I can KIND OF get it working in Portal only, but it still doesn't quite do what I need it to do.

Recent Answers

Brenden Kehren answered on January 29, 2015 17:51

You can do this all in Portal mode simply by setting visibility of the webpart zones or the webparts themselves. Then if you use content inheritance properly the pages will all inherit the master and other content as you're looking for. In fact, you can use multiple page placeholders (for v5 but still relevant) on a masterpage and specify what page template the sub pages use. This is very helpful for weird layouts/requirements.

Also keep in mind if you need to some some authentication items or other more global type items in code, these can be handled within a custom event handler. For instance, capturing the authentication event to maybe find out what user is logging in and assign an account number or maybe to authenticate with another system. Kentico allows you to do all of this without needing to create an aspx page template. Just write your code in the global event handler, it's more efficient than having to write code in an aspx template and is more accessible.

0 votesVote for this answer Mark as a Correct answer

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