When I use views for rendering a list of nodes the title appear twice.
First a line where the title is a link and then on the second row the title appears again, this time with no link.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Sungsit’s picture

FileSize
196.93 KB
130.71 KB

Could you please show me a screenshot?

I've tried Views to list Node titles and Node teasers but I can't find double titles displayed. See attached images below.

rojohansson’s picture

FileSize
46.44 KB
45.73 KB

Here's two screenshots. Teasers work. I think its the full node mode that makes this.

Sungsit’s picture

OK, I figured it out. In node.tpl.php, let's change a single variable in IF condition from <?php if (!$page): ?> to <?php if ($teaser): ?> (line 19). Like this below.

  <?php if ($teaser): ?>
    <h2 class="node-title">
      <a href="<?php print $node_url ?>" title="<?php print $title ?>"><?php print $title ?></a>
    </h2>
  <?php endif; ?>

This will display node titles as links in Views node teaser but plain text for full node, no more double titles.

I'll commit this for the next release. Thank you for your report.

rojohansson’s picture

Great! That solved the issue!

Thank's for a really great and unique looking theme.
I've altered the skyline slightly to look like my city Örebro in Sweden. The site is http://www.orebrosurfarna.se

Sungsit’s picture

You're welcome. Just don't forget to upload that new file for your live site too. (I still see double titles there ;)

gizu’s picture

Hi.

I just tried this fix, it does fit those double titles, but i am e.x using the audio module, and after this fix, all titles in main content looses their title.

Do i need to make settings in views?

gizu’s picture

Status: Active » Fixed

Double titles can be fixed by views.

Status: Fixed » Closed (fixed)

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