ASPX templates
Version 5.x > ASPX templates > Page Options View modes: 
User avatar
Member
Member
lwhittemore-emh - 8/18/2011 2:51:10 PM
   
Page Options
Is there a way to add options to a page so that when someone is editing a page in the admin they can use these custom options to change the way the page may work.

Example. Lets say I had a site that had a list of locations that showed on the page. Currently if I wanted to make it so the editor could choose whether or not the page displayed these locations I would create multiple templates with and without these locations.

Is there a way to do this without creating multiple templates? Ideally it would be great if there was a way that they could just click a check box that said they want to have these locations show on the page. This way if I had several items that I wanted to give the user control of I wouldn't need to create a bunch of different templates with every combination of options.

Hope this makes sense.
Thanks
Lawrence

User avatar
Kentico Developer
Kentico Developer
kentico_helenag - 8/22/2011 6:34:46 AM
   
RE:Page Options
Hi Lawrence,


You can use Editors widgets on the template: Widgets documentation.

You can specify a default set of widgets on the Design tab and then editors can add/edit/remove them on the Page tab. The widgets are page specific so the documents can use the same template but will display a different content.


Best regards,
Helena Grulichova

User avatar
Member
Member
lwhittemore-emh - 8/22/2011 7:46:14 AM
   
RE:Page Options
Thanks for your help, I will look into these widgets. Do these work in the ASPX model as well as portal? I'm not sure the reasoning but the company I work for has chosen the ASPX model vs the Portal.

User avatar
Kentico Developer
Kentico Developer
kentico_helenag - 8/22/2011 7:56:28 AM
   
RE:Page Options
Hello,


it only works with Portal templates in the current version but you can use Portal pages together with ASPX templates like: Combining ASPX templates and Portal engine templates.

The version 6.0 which will be released in September will allow widgets on the ASPX templates as well.


Best regards,
Helena Grulichova

User avatar
Member
Member
vin4.net-gmail - 7/11/2012 11:40:11 PM
   
RE:Page Options
Hi,

I have a requirement where single template is for multiple pages with different content on each page.
According to my knowledge, we can use widget for changing content on different pages which are of same page template.

But I am trying to figure out, is there any option where there are two pages referring to single page template but
1. In first page, there will be only one web part zone.
2. In Second page, there will be three web part zones and one widget zone.
.
When I make any changes to a template, it will reflect in all pages which are referring to this page template which I dont want.

Please help me out to achieve this requirement.

Thank you.

User avatar
Kentico Support
Kentico Support
kentico_radekm2 - 7/13/2012 6:47:24 AM
   
RE:Page Options
Hello.

What you described is principle of a page template. Template is something “in common.”

You could use either user widget, which is bound per document and is not shared, or clone a page template as ad-hoc template. Then it will become independent and will not influence other pages.

If you want to show/hide some webpartzone classes dynamically, according to current page, you can do it via custom macro called in the Visible property for the given webpartzone element. Within the code, you can evaluate some context value (like current document name) and decide whether to show it or not.

Best Regards,
Radek Macalik