Problem
In the file includes/add-content.inc
the function template_preprocess_panels_add_content_link()
preprocesses the add content links used in the modal. This preprocess adds the generic class panels-modal-add-config
but does not add anything else specific to the "content type" being added.
Motivation
This makes it difficult for one to override the CSS of the Panels admin, which is necessary at times. For example, maybe you like the ability to add an "Existing node" or "New custom content" but you don't want to use the default buttons. If smart CSS classes were added based on the ctools content type subtype name, then you could do this.
Proposed solution
Attached is a patch that adds a class based on the $vars['content_type']['subtype_name']
variable.
Comment | File | Size | Author |
---|---|---|---|
#2 | panels-add-content-link-subtype-class-2209799-2.patch | 1.25 KB | saltednut |
Comments
Comment #1
saltednutUpdated patch to use specific classes for the individual text links versus each item's accompanying icon link.
Comment #2
saltednutActually, appending the full name of the variable is probably makes the most sense. A slight revision to the class names in this one.
Comment #3
japerrySimple, looks good to me. Committed to both 7.x and 8.x (so we don't miss the simple change when converting the theme functions ;-))