Hi,

I had the problem that google was including panel 'panes' in its search results using the path /node/38 for example. I only wanted google to include full pages with aliased URL's and not the individual content of a panel pane.

The problem is that when you override the title when creating a pane, the title itself is empty but the template still includes an H2 tag with an A link.

To prevent this I modified the following lines in the file node.tpl.php. Now the complete H2 line is removed if there isn't a title and thereby also the link to the pane.

ORIGINAL:

     	 <h2 class="title"><a href="<?php print $node_url ?>" title="<?php print $title ?>"><?php print $title ?></a></h2>

MODIFIED:

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

This has worked for me without any other problems. Sorry, but I have absolutely no idea how to make a patch.. :-(

Thanks
Rich

Comments

richH’s picture

Issue summary: View changes

change the tags to capitals because the formatting was messed up

richH’s picture

Issue summary: View changes

same again - duh

richH’s picture

Version: 6.x-1.6 » 7.x-1.0
Category: support » bug
Priority: Normal » Major

Hi,

I just had to update the node.tpl.php file for the D7 version because google was picking up on all the nodes which were included in a panel because of the link which was included for empty H2 tags.

I've also had to go through all my indexed pages on google and put in URL requests to keep my index clean and to prevent people landing on pages which are actually panes because of this. Can we have this change in the D6 & D7 versions please?

My change is:
(line 83)

<?php if (!$page && !empty($title)): ?>
    <h2<?php print $title_attributes; ?>><a href="<?php print $node_url; ?>"><?php print $title; ?></a></h2>
  <?php endif; ?>

Thanks
Rich

ajross’s picture

As you'll see from my post here (http://drupal.org/node/1372052), I'm moving the next release of the theme onto a new base theme, due to lack of support for Fusion and Fusion Accelerator. If I have time, I may do one final release of the Fusion version with some bug fixes and if so, will work in your change. But thanks for posting and people who are sticking with the Fusion version may want to just manually insert this change as needed.

richH’s picture

Hi,

the final version of my change is:

<?php if (!$page && !empty($title) && $teaser): ?>
    <h2<?php print $title_attributes; ?>><a href="<?php print $node_url; ?>"><?php print $title; ?></a></h2>
  <?php endif; ?>

cheers
Rich

ajross’s picture

Status: Active » Closed (won't fix)

Theme is now moved to AdaptiveTheme, so I won't be correcting this in the Fusion version. But this should be helpful for anybody still using the old version.

ajross’s picture

Issue summary: View changes

just tweak a little