1

I have a view that renders a list of articles. Each article has a title, a main image and a trimmed part of its body.

I have both the title and the image are linked to the content i.e the article's details. This is not good practice for SEO. I want to add the attribute rel="nofollow" to the links to the content of the image field.

I have tried to search for a module that may do this task but I could not find any.

Also, I have tried to use REWRITE RESULTS like the following:

<div class="field-image"><a href="[view_node]" rel="nofollow">[field_image]</a></div>

However, it rendered wrong content because [view_node] tokens gives Read More html hyperlink.

By this way, to keep SEO, I have only to remove linking from image and this is not a suitable choice.

Is there any suggestion for modules do that or any way to rewrite the image field to be linked?

The following screen shot may offer extra visual details about my issue:

enter image description here

1

Add Nid field , exclude to display then in rewrite section instead

<div class="field-image"><a href="[view_node]" rel="nofollow">[field_image]</a></div>

try

<div class="field-image"><a href="node/[nid]" rel="nofollow">[field_image]</a></div>

  • We may use path field too. However, if the pathauto module is enabled, your solution will give the same result as path field. – SaidbakR Sep 6 '15 at 14:54
  • @sємsєм yes it is :) – Yusef Sep 6 '15 at 16:32

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.