Skip to content
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

Default card view attributes #16083

Merged
merged 3 commits into from
Nov 12, 2024
Merged

Conversation

i-just
Copy link
Contributor

@i-just i-just commented Nov 12, 2024

Description

Add the ability for elements to define the default card attributes for a given element type. The defaults will be used if no customisation of the field layout’s card view has taken place. Once you save a field layout (and so you’ve customised the card view in the layout’s config) the config will be used. If you were to change the defaults later on, they won’t affect the field layouts you’ve already saved and specified your own card view selection (even if that selection is empty). There’s also a corresponding event that allows you to tweak the default values further.

  • added src/events/RegisterElementDefaultCardAttributesEvent
  • added src/base/ElementInterface::defaultCardAttributes()

Related PR

#15283

@i-just i-just changed the title Default card attributes Default card view attributes Nov 12, 2024
@i-just i-just requested a review from brandonkelly November 12, 2024 08:54
@brandonkelly brandonkelly merged commit 3727555 into 5.5 Nov 12, 2024
@brandonkelly brandonkelly deleted the feature/default-card-attributes branch November 12, 2024 16:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants