Deletion of web part properties

   —   
This article will explain the consequences if you delete a web part property in Site manager -> Development -> Web parts -> edit -> Properties.
If you create a web part property and fill its value on a template, it adds the web part property to XML structure of that template. You can see the structure in:

Site manager -> Development -> Page templates -> edit -> Web parts

If you change the value of web part property it updates the XML structure. However, if you delete the property the structure will keep the property. It is by design behavior.

The consequence is that it uses the property for context macros. Then you can be surprised that the context macro of document field which is called like the web part property deleted in the past does not work correctly. You can avoid this issue if you use the full name of context macro like:

{%cmscontext.currentdocument.<field_code_name>%}

or delete the property from template web parts structure manually.

-hg-


See also: Developing web parts

Applies to: Kentico CMS 5.x
Share this article on   LinkedIn

Juraj Ondrus

Hi, I am the Technical support leader at Kentico. I'm here to help you use Kentico and get as much as possible out of it.