Change a page type to "Content Only"

Jay McCormack asked on June 20, 2018 08:11

Has anyone found a way to change a page type (after it's been created) to content only? I'm guessing if it was easy there'd by a tick box in the interface and I haven't found one yet. K11 in this instance.

Correct Answer

Rui Wang answered on June 20, 2018 14:15

I don't think changing it directly in SQL is the safest way as there are other connecting when it's a "page" versus "content only'.

My suggestion is to create a new "content only" page type, and use Kentico Import toolkit to import all the "page" version content into the "content only" version. Then remove the "page" items.

2 votesVote for this answer Unmark Correct answer

Recent Answers


Matt Nield answered on June 20, 2018 10:36

So, I've not tried this in depth yet (it's on my list of things to do); there is a bit column in the CMS_Class table named ClassIsContentOnly. Also, for each node in CMS_Tree, there is another bit field named NodeIsContentOnly.

By toggling these values in SQL, I can change the behaviour of the CMS pages application.

As far as I can see, the field in the tree determines how the document is displayed in the pages app, and the field in class definition determines the default value for instances of that class when created. I'm fairly sure that there is more to it that this, but this would be the place I would start. If you're using content pages, you're going to need to think about how you might want to deal with and widget content etc.

As I say, I've not looked in to this in any detail yet, so there may be some other issues that you need to deal with too.

0 votesVote for this answer Mark as a Correct answer

Matt Nield answered on June 20, 2018 14:27

:) I didn't say it was safe. Just a place to look if you really really think that you need to do it. As you point out Rui, there is a lot going on above and beyond these flags that potentially need attention. You can also set some of these values using the API, but again it's about weighing up the impact of those changes. Certainly re-importing the content into the page types is the cleanest option, but there may be reasons when you want/need to convert.

0 votesVote for this answer Mark as a Correct answer

Jay McCormack answered on June 20, 2018 14:32

Thanks to you both. I did find those flags in the schema @Matt but was reluctant to play with them without know the consequence of doing so.

I might take @Rui's suggestion and rebuild the page type and then import.

0 votesVote for this answer Mark as a Correct answer

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