[development] Altering links
Carl Wiedemann
carl.wiedemann at gmail.com
Thu Nov 18 19:31:23 UTC 2010
$vars['links'] is generated by theme_links(). Look at
template_preprocess_node() in includes/theme.inc:
http://drupalcode.org/viewvc/drupal/drupal/includes/theme.inc?revision=1.415.2.27&view=markup&pathrev=DRUPAL-6-18-SECURITY#l1955
$variables['links'] = !empty($node->links) ? theme('links',
$node->links, array('class' => 'links inline')) : '';
Unless you absolutely consider the icons to be content and not styling, CSS
is the way to go instead of <img> tags. Different CSS classes may be applied
via theme_links() to indicate whether comments exist. CSS also allows for
the use of sprites.
On Thu, Nov 18, 2010 at 12:27 PM, Salvatore De Paolis <iwkse at gmx.com> wrote:
> On Thu, 18 Nov 2010 10:57:26 -0800 (PST)
> nan wich <nan_wich at bellsouth.net> wrote:
>
> Hi,
>
> > You can do it in the CSS. Something like:
> > .infoAndActions ul li.comment_add,
> > .infoAndActions li.comment_comments {
> > background:
> >
> url(/sites/all/themes/forresterblogs/images/infoAndActions_commentCount.gif)
> > no-repeat left 8px;
> > padding-left: 29px;
> > margin-left: .3em;
> > }
> >
> >
> >
> > Nancy
>
> Yes thanks I could do this way, but I need more control over it.
> For example when no comments, I'd only like to show the icon and
> the text in the tooltip.
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.drupal.org/pipermail/development/attachments/20101118/73dddb4b/attachment-0001.html
More information about the development
mailing list