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.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

saltednut’s picture

FileSize
1.23 KB

Updated patch to use specific classes for the individual text links versus each item's accompanying icon link.

saltednut’s picture

Actually, appending the full name of the variable is probably makes the most sense. A slight revision to the class names in this one.

japerry’s picture

Status: Needs review » Fixed

Simple, 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 ;-))

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.