Site structure
Version 5.x > Site structure > How to convert template information to editable content in the CMS. View modes: 
User avatar
Member
Member
gary.marsh-apptix - 10/7/2011 8:55:47 AM
   
How to convert template information to editable content in the CMS.
We have recently installed Kentico and had an agency build out our templates, but we have been asked to add an element to the Left Side navigation. I am unsure how to do that without having to add it to the template itself, which in turn replicates that element on other shared templates. Is there a way to convert pieces of a template to editable fields within the CMS so we have more control over what we can edit? Or would this require a rebuild of the templates to include those areas as editable sections?

Hope this makes sense to someone.

Thanks!
Gary

User avatar
Kentico Consulting
Kentico Consulting
kentico_borisp - 10/7/2011 3:44:31 PM
   
RE:How to convert template information to editable content in the CMS.
Hello,

You can create an Ad-hoc template as described in our documentation. This way you will change only this one template and others won't be affected.

Best regards,
Boris Pocatko

User avatar
Member
Member
gary.marsh-apptix - 10/11/2011 3:03:21 PM
   
RE:How to convert template information to editable content in the CMS.
Thank you for the info., but is there a way to convert sections of an already existing template into editable fields? We have a template that has a sidenav built into it, but the sidenav content is not editable within the CMS and I need to add something that I can edit in the CMS, but only on one specific page of the template.

Hope that makes sense.

Thanks!

User avatar
Member
Member
lancetek - 10/12/2011 3:04:14 AM
   
RE:How to convert template information to editable content in the CMS.
When to fork(copy) templates is a personal preference. As Boris says, an ad-hoc template is probably the *easiest* thing to do. But Kentico is a VERY flexible asp.net application, so you *could* find other ways to accomplish your objective - one other that I can think of is:

1 - Add an editable content control to the normal template and use a 'location' macro in the visibility field so that it is only visible on the one page where you need it:

{%cmscontext.currentdocumentparent.nodealiaspath|(contains)specialPage%}


So for this example, when you are on a page with 'specialPage' in the Url, the macro will return 'true' (which if inserted into the visibility field will show the control)

Be aware that in some scenarios this type of template could get covered in usercontrols that are only shown for a single page... which could make it difficult to debug and troubleshoot - hence the 'forking' comment.

Lance