Developer forum

Forum » Feature requests » Have an option to instruct the item dropdown to exclude items on inactive paragraph

Have an option to instruct the item dropdown to exclude items on inactive paragraph

Ben Doorn
Reply

Hi,

It will be usefull to have an option in the OptionItem attribute to control what to do with inactive items.

I have a dropdown field in an itemtype which is listing all paragraph items of a specific type, however when i disable the paragraph the item stil appears in the list. Is it possible ta add a parameter to the attribute. When set the query should exclude the inactive items.

[OptionItem("ButtonConfiguration", "ConfigurationName", "Id", ActiveOnly = true, SourceType = FieldOptionItemSourceType.CurrentArea, IncludeChilds = true, IncludeParagraphs = true, ItemSystemName = "ButtonConfiguration")]

Ofcourse, we could resolve this with the SQL version of the options attribute, but i'd like to stick to the API as long as possible.

The sample is about paragraphs but the same can be applied for pages.

Kind regards,

Ben

 


Replies