Is it possible to limit the new widget Page Selector by a given page type? I know you can set it to load a specific path using EditingComponentProperty(nameof(PageSelectorProperties.RootPath) but can't see a way to limit by page type.
Asked
Active
Viewed 333 times
2 Answers
0
Currently there isn't, just by path i'm afraid. Not sure if Kentico is working on it, it would be nice to have as we have run into the same thing.

Trevor F
- 1,429
- 9
- 6
-1
You could always add a new widget property
In your model properties class
[EditingComponent(TextInputComponent.IDENTIFIER, Order = 0, Label = "Page Selector Class")]
public string PageSelectorClass { get; set; }
In your controller
var pages = DocumentHelper.GetDocuments(GetProperties().PageSelector)
//any other LINQ statements you need

Regis
- 166
- 4
- 17
-
I'm not sure this would work? I need to filter the actual page selector, not do something with what was selected. – mp3duck Oct 31 '19 at 09:15
-
@mp3duck O so you want to restrict it so you can only select a specific page type. As far as I know this isn't possible. You'd have to [create your own form component](https://docs.kentico.com/k12sp/developing-websites/form-builder-development/developing-form-components/example-developing-a-custom-form-component). – Regis Oct 31 '19 at 18:20