The basic options that are available for you, on a Portal Engine Kentico website, are to use :-
Well, what do you suggest then?
There are two main options -
This is all good, but we all know as we all try to build more complex sites, that this approach is not sufficient and we need more flexibility.
What approach should I use?
What's my best option to handle this?
What can I do about this?
For all of these scenarios, the question usually is...
Why should I need to load all this code in the Master Page and therefore every page for something that is only used for my scenario?
That is a good question and if we are building sites, which need to be as optimised and quick as possible then every byte matters.
What are the options out there?
Lets look at the scenarios in more detail
I don't like this approach so I would recommend using the approach, which I will suggest for Scenario 2.
One option for this is to use Multiple Page Placeholders. This approach is fairly simple to use and the one I would recommend to help resolve this scenario. The way it would work is that you place you Page Placeholder web part, how you would normally, within your main zone.
The assumption is that you set the Multiple Page Placeholders properly using the information provided by Kentico and apply this throughout your site and all the templates. If you are using this approach, it is recommend to set it all properly at the start of the site development, as incorporating this later on is still possible, but tricky when you have more and more templates created.
This seems like a decent solution for the two scenarios.
For additional information about this please read the documentation as Conditional Layouts seems like a very powerful way of composing your Page Templates.
This seems a like a really good approach to me, because for the other Page Types no additional code will be loaded!
Excellent as Mr Burns would say!
Kentico Documentation - Conditional Layouts in Page Templates
Multiple Page Placeholders in Kentico - DevNet Article by Martin Hejtmanek CTO at Kentico Software