Early Bird Registration for DrupalCon Portland 2024 is open! Register by 23:59 PST on 31 March 2024, to get $100 off your ticket.
Right now, fences just uses <div>
as the default configuration for all divs. It would be awesome if it could provide different defaults depending on what field.
We need to add an API so that fences (and possibly other modules or themes) can provide some default configurations for fields.
For example, comment body field needs NO wrapper at all. And a node's "Tags" taxonomy field should be a UL.
Comment | File | Size | Author |
---|---|---|---|
#1 | fences-default_suggestion_api-1343704-1.patch | 845 bytes | iamEAP |
Comments
Comment #1
iamEAP CreditAttribution: iamEAP commentedI wonder if a simple module invocation is too naive a solution? Patch attached.
Example usage:
Comment #2
iamEAP CreditAttribution: iamEAP commentedWhoops. Needs review.
Comment #4
JohnAlbinAdditionally, we could have a config screen that allows you to set default HTML wrapper for certain sets of fields.
Like taxonomy terms could always use UL elements. Body field to have no wrapper. Image fields to have figcaption?
Comment #5
JohnAlbinYep. Hook-based default configuration is a good idea.
Comment #6
JohnAlbinThis would be a backwards-incompatible update.