Is it possible to make links created in feed item nodes rel="nofollow". For example, making the "Read Original Article" link "nofollow" if that is possible.

Does anyone know how to do this? I've tried looking at my theme and the FeedAPI code and couldn't find a place to insert it. Any ideas? Thanks.

Comments

bennos’s picture

Hello

You can try it with Contemplate.

I think there you can theme the output of the teaser, rss and of the full node.

bennos

Mitch87’s picture

Thanks Bennos. Following the easiest path, I added rel=nofollow as an attribute to $links in the feedapi_node.module. It's not an optimal solution because it will mean remembering to make that hack with each future version (unless it is included :) ).

I also tried ConTemplate like you suggested, and agree that the capability probably is in there, but I couldn't figure it out :( .

juliendorra’s picture

I think I did something similar with rel=me -- in a more future proof way :

I told about it a the end of this comment on theming the title link : http://drupal.org/node/216936#comment-801689

For the links at the bottom I did something similar :

<?php if ($links): ?>
   <?php /* Note that I only keep link to original article */ ?>
    <div class="links">
      <a class="feedapi_original" rel="me" href="<?php print $node->links['feedapi_original']['href'] ?>">Read complete post</a>
    </div>
  <?php endif; ?>

Obviously you should have a specific content type for your aggregated content, or this theming node could loose the generic links capability.

mustafau’s picture

Status: Active » Fixed
Anonymous’s picture

Status: Fixed » Closed (fixed)

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