Control that accepts a list of Page Type

Pierre Clément asked on May 30, 2022 15:38


I'd like to know if there's a control that can accept a list of Page Type. I know that there's a Uni Selector available to link pages, but it only accept one page. My goal is to create a widget that will display a list of links.

I know that I can create two Page Type for this widget to work. One that will be a Folder, and the other will be a "link" page type. The Widget can have the Folder has the Datasource and have the Widget gets all it's children to fetch the data.

However, this method creates a lot of extra content in the Tree for just showing links. I'd like to know an alternative way to do this.


Correct Answer

Pierre Clément answered on June 3, 2022 16:39

Hello, I just found out that there's a Data Type named Pages that was not there in the older versions of Kentico. This is what I was looking for.

0 votesVote for this answer Unmark Correct answer

Recent Answers

Juraj Ondrus answered on May 31, 2022 06:29

What do you mean by UniSlector accepting one page only? You can set this control for multiple selection. You can list whatever object type, including multiple page types at once. For pages, use the "cms.document" object type and then use the WHERE condition and specify the "ClassName": ClassName = 'PageTypeCodeName1' OR ClassName = 'PageTypeCodeName2' OR ClassName = 'PageTypeCodeName3' ...

0 votesVote for this answer Mark as a Correct answer

Juraj Ondrus answered on June 5, 2022 19:44

The 'Pages' form control is designed for related pages (ad-hoc relationship). Keep in mind that this control does not support multilingual pages.

0 votesVote for this answer Mark as a Correct answer

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