-
Notifications
You must be signed in to change notification settings - Fork 204
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
Add option to disable particle items #2509
base: develop
Are you sure you want to change the base?
Add option to disable particle items #2509
Conversation
Tagging people @JoomFX @w00fz @N8Solutions @yellowwebmonkey |
@thexmanxyz This is a great feature but in my opinion it should be implemented on the framework level somehow. |
@JoomFX Yeah that is also what I pointed out ;). A ideal solution would apply this automatically and handle the filtering of disabled ones. |
@thexmanxyz I just have a single major wish: Please change the option to be positive instead of negative. This is for usability as it is better to keep enabled (green) state on left and disabled (red) on the right. :) Also look at how the other buttons are labelled etc. :) |
@mahagr Their is an issue with |
@mahagr I updated the particles. I changed the description, the type is now |
Yes, you need to enter a default value in order to make it work before saving. That is fully expected as otherwise the default is null (not set). |
@mahagr I'm not sure if we are talking about the same. If I set up the following control:
in a |
Yes, we are. What you're talking about is the default behaviour for configuration. If the value is not set, Gantry thinks it is null even if you had the default set in the blueprints. Blueprints are only used for displaying the form and saving it. |
@mahagr Alright, I'm glad that we talking about the same thing. Ok I now understand how the default values work! Thanks. |
I added an additional field to all relevant particles which contain a
collection.list
to allow that a user can selectively disable certain front-end items. The idea for this adaption comes from @yellowwebmonkey. The particles which I found and come into question are:Please also see the PR #2286 which contains the same functionality for the Owl Carousel.
Edit:
This might however not be the final solution because the best way to solve this would be to have a default field which is always present on
collection.list
items to disable items. But I'm lacking project knowledge to implement this in a slick way. Also there are quite some considerations (this is clearly not needed everywhere and the disable functionality has to be either additionally implemented in the correspondingtwig
files everywhere where it is missing or the elements have to be already auto-filtered on the disable boolean before they are passed over totwig
) and a lot of other elements are effected by such a change.In the long term I'm with the solution of auto-apply a disable field and auto-filtering items on the fields value and only then passing them over to
twig
. I would consider it to work like it does on Atoms and Particles but only this time applied to a list of items instead. Because this would be a solution every RT template would benefit from too. Because the current state of deleting items instead of hiding them is kind of annoying.