-
-
Notifications
You must be signed in to change notification settings - Fork 57
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
New dcaPicker: Limit tab items #924
Comments
You cannot limit the tabs. We discussed that and we do not think this makes sense because the picker is extensible and every developer can add their own tabs which you would then need to explicitly allow in every single DCA configuration where that picker is being used. That would be a nightmare to maintain 😄 That's why there is the concept of the Just pass |
Thanks toflar for your answer! |
Contexts are fine - but I do not understand that reasoning. If you want to limit your picker to only News articles for example, why would you care about the extensibility of the picker from other arbitrary extensions? I was also hoping that this would be possible. |
If you don't grant access to anything but news and events, there will be only those two tabs. |
Of course - but I meant what if I want to create a widget, where I specifically only want news to be picked. The editor has access to events as well general, but I do not want him to be able to pick events or anything else but news for that widget. |
You would probably need to define your own context and implement a picker for it. |
Is assigning a new context as easy as it looks? Just add a context==='newtype' in the Menu class and then add it to DCA: dcaPicker=>array('context'=>'newtype') ?? |
you also need one or multiple providers that support the context. @contao/developers we might want to support context link_news to pick just a news items etc. |
That would be best, imho. |
This is now supported in #950 'eval' => ['dcaPicker' => ['providers' => ['filePicker']]] |
Great, thank you @aschempp. |
Big thanks and good job guys! |
Hi,
is it currently possible to limit the tabs of the new dca picker?
If not it would be nice to have a feature like this.
As example to create a field with dcaPicker=>true and limit the possible tabs to "news" and "events" instead of showing all tabs.
Thanks and great job!
The text was updated successfully, but these errors were encountered: