O'Reilly logo

Drupal 6 Theming Cookbook by Karthik Kumar

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Hiding node links using CSS

While manipulating node links is best done using Drupal's hook_link_alter() function, sometimes adding a couple of lines of simple CSS can do the trick rather neatly as well. In this recipe, we will look at hiding only the Read more link from a node's teaser display. To make things a little more interesting, we will be doing this solely for authenticated users and, as a further restriction, limit it only to story nodes.

Getting ready

We will be using the myzen theme created earlier in this book as the example theme in this recipe. It is assumed that sample story nodes are available and that they are displayed as teasers in node listings to ensure that the Read more link is displayed. Teaser configuration can be performed ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required