Portal Engine Questions on portal engine and web parts.
Version 5.x > Portal Engine > Page specific web parts to a template web part zone View modes: 
User avatar
Member
Member
tim-finndigital - 12/1/2010 3:13:11 PM
   
Page specific web parts to a template web part zone
I have a template that most of the pages in a website need to use, a 3 column layout. Left column is nav, center is content, and right column is for supporting callouts/content. I have created a couple of web parts that will allow the end-user to add these box callouts to the right column, but the end-user needs to add them specific to that page.

If we add a web part, it gets added to the template, which gets added to every page.

Is there a way to have a collection of pages use the same template, but have the ability for a user to add unique web parts to the right column zone, on a per page basis.

Thanks in advance!

User avatar
Kentico Developer
Kentico Developer
kentico_helenag - 12/2/2010 5:05:02 AM
   
RE:Page specific web parts to a template web part zone
Hello,


you can clone that template and create ad-hoc template.


Best regards,
Helena Grulichova

User avatar
Member
Member
tim-finndigital - 12/2/2010 8:16:17 AM
   
RE:Page specific web parts to a template web part zone
I was hoping there was another way, creating ad-hoc templates gets the end result we want, but it's creating a unique template for each page, and then management for updates to templates becomes a problem.

Is creating ad-hoc templates the only solution to this?

Thank you for help!

User avatar
Kentico Developer
Kentico Developer
kentico_helenag - 12/2/2010 8:23:10 AM
   
RE:Page specific web parts to a template web part zone
Hello,

You can also use Editor widgets which are unique for each document even if they share the same template. Please see the Page editor section of Widgets documentation.


Best regards,
Helena Grulichova

User avatar
Member
Member
joshuar-theprimacy - 9/13/2013 4:20:19 PM
   
RE:Page specific web parts to a template web part zone
This is still not clear to me. Is there any way to break the inheritance somehow in Kentico?

User avatar
Member
Member
kentico_sandroj - 9/13/2013 6:23:03 PM
   
RE:Page specific web parts to a template web part zone
Hello,

Could you please explain your specific scenario? It is possible to break inheritance but where and how depends on your requirements.

Best Regards,
Sandro Jankovic

User avatar
Member
Member
joshuar-theprimacy - 9/16/2013 7:48:43 AM
   
RE:Page specific web parts to a template web part zone
So to begin, I am using Kentico 7.0.34. I have one master page and 3 page templates(aspx + Portal). Each one of the Page templates has a CMSWebPartZone that I added to the aspx page. This is great because I can see the zone and I am able to place web parts within that zone using the design tab, but I am noticing that every document that uses that page template inherits all of the web parts that were added (web parts are not tied in to the document type, yet it seems like they are tied in to the page template). I need a solution so that when I add a web part to one document of document type whatever it may be, the other documents of the same document type are not affected. I don't want to use adhoc templates, because it seems silly to make a client create an adhoc template for each document type. Is there any other solution? Should I be using widgets instead of web parts? Any help is appreciated.

Thanks,
Josh

User avatar
Member
Member
lancetek - 9/16/2013 8:23:42 AM
   
RE:Page specific web parts to a template web part zone
Josh,
Please provide an example of what you'd like to be able to do. Kentico has a great templating mechanism and it's quite flexible, once you grok how to use it.

Page templates - layout and content will be inherited by *every* page that uses that template. However, the 'Editable Text' (and the other 'editable' web parts) have different content per page. Also macros and parameters of Webparts will be parsed and interpreted per page.

Use Case #1: I want to have ONE layout for all my Articles... but the Article content will change - so same header and footer, style and same widgets in the side navigation.

Use a template with a Repeater in it. Configure the Repeater to display the current Article's properties using a Transformation. Assign this template to all of my Article Documents. You can even assign this template by default to the Document Type 'Article', so that the editor doesn't have to choose it each time a new Article is created.


Use Case #2: I want to have a common template for all of my 'help' pages. This is similar to #1, but I don't want to create separate Documents, I just want to create 'Page (Menu Item)' Documents.

Create a help page template and use 'Editable Text' regions for the header and body of the page. Use this template when creating a new 'help' page. The Editable content will differ per page.


Advantage to both: Next year when you do a redesign (or you just want to move some widgets in the left navigation), you only have one template to modify.

I hope this helps,
Lance


User avatar
Member
Member
joshuar-theprimacy - 9/16/2013 8:39:49 AM
   
RE:Page specific web parts to a template web part zone
lancetek wrote: Josh,

Page templates - layout and content will be inherited by *every* page that uses that template. However, the 'Editable Text' (and the other 'editable' web parts) have different content per page. Also macros and parameters of Webparts will be parsed and interpreted per page.



That is the exact issue that i am having. I want the client to be able to choose what webparts will display on any given document. Right now they do not have that ability because if multiple documents use the same page template they ALL share the same web parts.

User avatar
Member
Member
joshuar-theprimacy - 9/18/2013 2:28:08 PM
   
RE:Page specific web parts to a template web part zone
Is there any solution or workaround?

User avatar
Member
Member
kentico_sandroj - 9/18/2013 3:07:28 PM
   
RE:Page specific web parts to a template web part zone
Hello,

As Lance described, in that scenario you can generate different content by the same Web parts but you cannot have different Web parts on the same template. You could adjust the visibility settings and the content of the Web parts which may accomplish what you are looking for.