- Issue created by @tim-diels
- Status changed to Needs review
over 1 year ago 12:49pm 8 June 2023 - π§πͺBelgium tim-diels Belgium π§πͺ
I've provided the code to allow categories to have an image.
This image will be used as fallback when the block has no image specified.
If category doesn't have an image, the default behaviour is kept, so this is BC.
Provided an update hook for the base fields on the categories. - πΊπΈUnited States codechefmarc
I was able to test this one out and it works great! In looking at the code, do you need a getter/setter for your new fields in LayoutBuilderBrowserBlockCategory.php? I'm not as well versed in custom entities so not sure if that is required there or not.
I have another patch which adds a generic fallback image to blocks that don't have an image or for reusable blocks at the bottom, if enabled. I tested both patches together and they work perfectly well to allow for category fallbacks and if they aren't set, the generic fallback works. If both of these get merged in, we should also change the language on the forms a bit to make sure that folks know which fallback image will be used depending on what is set.
- First commit to issue fork.
-
StryKaizer β
committed b59528a3 on 8.x-1.x authored by
tim-diels β
Issue #3365606: Allow categories to have images to be used by the blocks...
-
StryKaizer β
committed b59528a3 on 8.x-1.x authored by
tim-diels β
- Status changed to Fixed
10 months ago 10:28am 4 March 2024 - π§πͺBelgium StryKaizer Belgium
Mercie tim!
Great addition.
In a follow-up we might consider adding a fallback in the settings page too, so we can set either on category level or a global fallback image
Automatically closed - issue fixed for 2 weeks with no activity.