[heur][bcc][faked-from] [development] hook_link - proposal
Mark Fredrickson
mfredrickson at ppmns.org
Thu May 11 13:55:45 UTC 2006
>
> It would be great if instead of this:
>
> $links[] = l(t('read more'), "node/$node->nid", array('title' => t
> ('Read the rest of this posting.'), 'class' => 'read-more'));
It wouldn't be so bad if modules actually did this - but only some
modules actually output a class on their links. Having some links
with CSS and some without is a frustrating thing for a themer. I've
filed at least 2 bugs on modules not including classes.
>
> Modules were doing something like this:
>
> $links['mymodule'] = array('title' => t('Read the rest of this
> posting.'), 'url' => "node/$node->nid", 'class' => 'read-more');
>
> And relying on the themes to actually display the link.
>
In this situation, a theme could add a class to every link because it
knows what module outputted the link. At a minimum, perhaps the code
that concatenates all the links should automatically include the
module's name as a class?
-Mark
More information about the development
mailing list