Blog module customization

Dmitry Bastron asked on July 12, 2016 08:53

Hi community!

I need to customize a Blog module for my site. I.e. I need to add some custom fields to CMS.Blog and CMS.BlogPost page types. What is the best way to do it? Just add new fields to the system page type? And also I need to add a new field to the Blog comment class (which is not customizable in the Blog module). How can I achieve this?

Correct Answer

Jan Hermann answered on July 12, 2016 11:26

Yes, simply extend those two page type with custom fields you need. The blog comment class can be extend by another binding class:

There is also a way to make the class customizable, but it's not recommended because of possible problems during upgrading. But if you want I can tell you how to do that :)

1 votesVote for this answer Unmark Correct answer

Recent Answers

Dmitry Bastron answered on July 12, 2016 12:28 (last edited on July 12, 2016 12:29)

Thank you! If I remember right, it should be enough just to unseal the Blog module in Kentico - But I'm looking for a good solution ;)

What would happen during Kentico update if I extend those two system page types? Is this approach is an "update-save" way?

0 votesVote for this answer Mark as a Correct answer

Jan Hermann answered on July 13, 2016 08:29

Actually, to add new fields to that class you need to mark the class as ClassShowAsSystemTable in CMS_Class database table and then restart the application (not recommended and not supported, but possible).

The worst thing that could happen during upgrade is that the upgrade script cuts those extra columns and you loose your extra data. However, if you backup it before upgrading and then recreate it again, you should be fine.

0 votesVote for this answer Mark as a Correct answer

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