-
Currently card contents are defined by selecting specific fields to be displayed in it - in field layout designer. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
There is a However, if the goal is to add some custom content to the card in addition to the custom fields exposed via the "Show in element cards" layout element option in field layout designers, that event is a bit cumbersome to use, since you have to parse the entire HTML for the rendered card and figure out how and where to inject your custom content. To that end, it'd be great if another event (like |
Beta Was this translation helpful? Give feedback.
There is a
Cp::EVENT_DEFINE_ELEMENT_CARD_HTML
event, which can be used to manipulate the HTML for element cards inside the control panel. I actually use this event in my CP Field Inspect plugin, in order to add a "Edit Entry Type" link to card action menus.However, if the goal is to add some custom content to the card in addition to the custom fields exposed via the "Show in element cards" layout element option in field layout designers, that event is a bit cumbersome to use, since you have to parse the entire HTML for the rendered card and figure out how and where to inject your custom content.
To that end, it'd be great if another event (like
EVENT_DEFINE_ELEMENT_CARD_BODY_FIELDS
or si…