Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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.
Comment | File | Size | Author |
---|---|---|---|
#2 | front_view.png | 45.73 KB | rojohansson |
#2 | front_view_admin.png | 46.44 KB | rojohansson |
#1 | node-title-list.png | 130.71 KB | Sungsit |
#1 | node-list-teaser.png | 196.93 KB | Sungsit |
Comments
Comment #1
Sungsit CreditAttribution: Sungsit commentedCould 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.
Comment #2
rojohansson CreditAttribution: rojohansson commentedHere's two screenshots. Teasers work. I think its the full node mode that makes this.
Comment #3
Sungsit CreditAttribution: Sungsit commentedOK, 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.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.
Comment #4
rojohansson CreditAttribution: rojohansson commentedGreat! 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
Comment #5
Sungsit CreditAttribution: Sungsit commentedYou're welcome. Just don't forget to upload that new file for your live site too. (I still see double titles there ;)
Comment #6
gizu CreditAttribution: gizu commentedHi.
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?
Comment #7
gizu CreditAttribution: gizu commentedDouble titles can be fixed by views.