content zone inheritance

kyle shapiro asked on September 16, 2015 23:58

I have a situation where I want 4 buttons to appear on all pages of my website (with some exceptions) but the locations of where I want them to display is different depending on the page. This inheritance needs to be override-able, allowing for specific pages to display their own buttons. I have an example of this done in the aspx development model, but I have not been able to think of a solution that would work in the portal engine. Is there any way to point a webpart zone to inherit another page's webpart zone, but still have it be available for change in the page view on that specific page?

Recent Answers


Brenden Kehren answered on September 17, 2015 02:06

I've seen this done before where you create a single page with a basic layout and just content, no header, footer, etc. just content. Then you place a page placeholder on the template and you can then specify which page and template you want it to display by default. See if that works for you.

Another option might be to create a webpart and just place that webpart on the different templates you need.

0 votesVote for this answer Mark as a Correct answer

kyle shapiro answered on September 17, 2015 18:43

Using a page placeholder disables the ability to edit a webpart on the inheriting page in Page View. If I change it in the design view or from Edit Page on the live page, the change alters the original master template. I tried link image, editable image, and editable text webparts, the result was always the same. Having different templates with different webparts that are not all pointing to some master webpart makes it very difficult to change one of these button defaults site wide. For the end user it would be right, but I am trying to design this with clean content management in mind. Having both a default and custom version of these buttons exist on the page, and writing some logic that would remove the default if the custom had something selected for it might be some sort of solution. I will continue to think on it, and post back here if I figure out anything. Thanks Brenden. I see you are now "Kentico MVP". I don't know what all that entails, but you certainly deserve it! Congratulations.

0 votesVote for this answer Mark as a Correct answer

Joshua Adams answered on September 17, 2015 20:12 (last edited on December 10, 2019 02:30)

Not sure if this would be a viable option for you or not Kyle, but you could also set the visibility through macros of the items, so in the master you can have your condition as {%cmscontext.currentdocument.nodealias|(notequals)Logon|(identity)GlobalAdministrator%}

Otherwise, you may be able to use Variants of the webparts. Haven't done too much with that, but maybe one of those could be an option.

0 votesVote for this answer Mark as a Correct answer

kyle shapiro answered on September 17, 2015 20:37

Thank you for your response Joshua. I will keep this in mind while seeking out the best solution possible.

0 votesVote for this answer Mark as a Correct answer

kyle shapiro answered on September 28, 2015 17:06

I did end up developing a webpart to serve this functionality. Thank you both for your responses.

0 votesVote for this answer Mark as a Correct answer

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