Kentico CMS Projects Do you need a company to create a web site with Kentico CMS for you? Choose one of our partners or post your project here.
Jobs and projects > Kentico CMS Projects > Custom Control Needed For Template View modes: 
User avatar
Member
Member
rodm-montcalm - 2/26/2009 2:32:56 PM
   
Custom Control Needed For Template
We have an opportunity to create a custom control for Kentico to display parts of a template based upon the site directory. We have a small site that we want to be integrated for search and ease of content creation which requires our template to display different banner and menu components for pages in that folder.

User avatar
Kentico Support
Kentico Support
kentico_jurajo - 2/28/2009 7:03:30 AM
   
RE:Custom Control Needed For Template
Hi,

I assume that you are using Portal engine templates. If I am getting the right meaning, you want to have different section of the web site with different layout. To achieve this, you can change (or break) the page templates inheritance from the master page (http://www.kentico.com/docs/devguide/visual_inheritance.htm), so each page which is not inheriting the content and layout from parent(s), can have different layout.

Also, if you want to have different picture (or flash, etc) as the main logo for different sections, you can take inspiration here - http://devnet.kentico.com/Knowledge-Base/portalengine/Using-different-graphics-for-different-site-sectio.aspx.

I hope this is what you need and that it will help. If not, could you describe your need with more details - e.g. some example of the site structure, etc.? Thank you.

Best Regards,
Juraj Ondrus

User avatar
Member
Member
rodm-montcalm - 2/28/2009 7:22:11 AM
   
RE:Custom Control Needed For Template
We have a regular section of the website and then a highschool section. They have different banners and menus but look similar. We would also like to have the main pages for each site have larger banners. Then the inside pages would leave off a slogan/flash area and show content higher in the page. We want to keep them in the same kentio site for searching and linking. The highschool site is smaller. Probably a dozen pages. When I tried the inheritence, I could not make it work and support suggested I go the route of a custom control. If I can do it with inheritence, I would be very happy.

So am I in the wrong forum looking for someone to write a custom control?

Thanks

User avatar
Kentico Support
Kentico Support
kentico_jurajo - 3/2/2009 8:13:15 AM
   
RE:Custom Control Needed For Template
Hi again,

I probably did not get the right meaning of your post - you are looking for someone who will develop it for you, right? I am sorry for the confusion.

Just to make sure I got the right meaning. You want to have a site structure like this:

root
- pageA
---PageA1
- pageB
- ...
- New section
---PageX
------PageXY
---PageY

Where the new section should have different look? If yes, you need to set the "New section" page to not inherit from parent (root) page as it is mentioned in the Visual inheritance document.

Then, I assume that you want to use different logos for the main page and for the other section - since the parent page of the new section will not inherit from the root document, you can add there other image, other banner and also other web parts as you want to.

I hope it makes more sense now.

Best Regards,
Juraj Ondrus

User avatar
Member
Member
rodm-montcalm - 3/2/2009 8:48:43 AM
   
RE:Custom Control Needed For Template
We are almost on the same page. For New Section, I do not want the users selecting the images and menu. I want it to be part of the template. The menu for this section is isolated to this tree.

Also, and this is not as important, the designer wants PageA and PageX to have a larger banner than the rest of the site.

Thanks for your help. It is much appreciated.

User avatar
Kentico Support
Kentico Support
kentico_jurajo - 3/4/2009 7:09:31 AM
   
RE:Custom Control Needed For Template
Hi,

You can place the images directly in the template e.g. using CSS styles. Also, you can deny the access to the Design tab for editors and you can use e.g. static text web part which is not editable on Page tab.

Also, the bigger banners - you can easily create new template - by saving current template as a new one and then add bigger banner to it so the other templates won't be affected.

Best Regards,
Juraj Ondrus

User avatar
Member
Member
rodm-montcalm - 3/10/2009 7:46:30 AM
   
RE:Custom Control Needed For Template
Thanks for your help on this item. With your feed back and the help of the support line I was able to accomplish this with a custom control. I'm certainly not a big Visual Studio person but it wasn't too hard. I used the CMS.CMSHelper.CMSContext.CurrentAliasPath property to determine where I was in the site and then displayed different images based on the result.

It is really easy to do this integration with asp.net and Kentico.

Rod Middleton