Modifying CMSWebParts - What'll happen when you export site or upgrade Kentico?

Ismail Mohd asked on March 14, 2019 05:45

Hi, I've edited the codebehind of some files under CMSWebParts/Membership/Profile, built the project and uploaded the library and everything seems fine.

Would I have to re-do my code edits to these files when I export my site and install into another Kentico instance, or when I upgrade Kentico?

Correct Answer

Juraj Ondrus answered on March 15, 2019 08:53

After you cloned and registered the web part in the system, simply use your custom web part on the Design tab instead of the default one.

0 votesVote for this answer Unmark Correct answer

Recent Answers


Juraj Ondrus answered on March 14, 2019 09:09

Hi,
Well, when uopgrading or hotfixing your changes could be overwritten. The same if you will import the web parts or sites with the code files from other Kentico instance. The recommended approach is to clone the default web part and do the changes in the clone. Just as described in the documentation.

1 votesVote for this answer Mark as a Correct answer

Ismail Mohd answered on March 15, 2019 08:29

Thank you for your reply! Ok, so I've followed the instructions on the doc on how to clone a web part and edit the codes... So how do I configure the system to use my cloned web part instead of the original one? For example, I cloned the "Change password" web part under Membership -> Logon & Registration.

0 votesVote for this answer Mark as a Correct answer

   Please, sign in to be able to submit a new answer.