The content creation links on group landing pages above the list could be made more themeable. Currently there are only 2 ways to style them, and neither of them are optimal.

  1. Use very specific CSS targeting the elements (the current implementation).
  2. Implement hook_preprocess_link() and add a class.

The first approach is bad because it makes it hard for a subtheme to change the styles as they have to use a selector list 5 deep to do so. The latter is bad since it can cause performance issues considering the number of items on a page that use that very function. This is without mentioning the logic that would be involved to properly determine the appropriate link is getting the class.

One solution is to not use l() to generate the link and instead use theme(). If you give it a hook of something like "link__commons__create__<type>", it will allow a theme function to specifically target them. Using a preprocess or override for this set of links should be much more efficient and allow for better subtheming.

The link in question

Comments

ezra-g’s picture

Status: Active » Fixed

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