ASPX templates
Version 5.x > ASPX templates > Kentico templates – Best practice for modifications View modes: 
User avatar
Member
Member
•●♥๑ஐ♥ღ Victoria ღ♥ஐ๑♥●• - 11/24/2011 10:33:22 AM
   
Kentico templates – Best practice for modifications
The current website we are developing with Kentico is in ASPX mode. For some pages, such as the FAQ page, it is using the built in document type to display the questions and answers. The issue is that the default FAQ template that ships with Kentico is called, for example, “Q&As – simple list”. This is a template we would like to use, but is in portal mode. Because we have some ASPX templates for our site layout we have to create a new template called “Q&As – simple list – OurSiteName”. This feels redundant as we are finding we are copying a lot of the standard templates just to we can point it to our ASPX templates.
The alternative to this is that instead of creating new templates each time, we just modify the default Kentico templates. So instead of making the new template above, we would just change “Q&As – simple list” from portal mode to point to our ASPX template. We are worried though that this might cause issues with future patches or certain functionality that exists in the portal mode to be lost when switching to the ASPX template.
Which of these two techniques would be advised? The first feels like it’s introducing a lot of redundant templates, but the second we are overriding the default functionality of Kentico. Which would be the recommended way of setting these up?

User avatar
Kentico Support
Kentico Support
kentico_jurajo - 11/25/2011 8:40:58 AM
   
RE:Kentico templates – Best practice for modifications
Hi,

I am little bit confused. If you change the portal template in its settings to be an ASPX page template and point it to the ASPX file it won't be touched by the hotfix/upgrade (in 99% of cases, unless there is a really bad bug in the template code :-)).

However, a very good practice is to use a custom name. It is because you can overwrite the page template when importing another site which will have the same page template and page template name (when importing, the objects which are already present in the DB are marked with an asterisk, but it is a common mistake that they are overwritten by the imported site objects).

Best regards,
Juraj Ondrus

User avatar
Member
Member
•●♥๑ஐ♥ღ Victoria ღ♥ஐ๑♥●• - 11/25/2011 9:25:19 AM
   
RE:Kentico templates – Best practice for modifications
Thanks for the reply.
That’s good to know the upgrades won’t be affected by changing the templates.
As for your second point, this was another scenario we were worried about and your explanation makes sense.
Thanks Juraj!