1

I'm using Drupal 7 and Clean theme. My main module is Views. And created 2 field in a content type and listed via Views on page.

I want, rewrite a field link on a other field.

e.g. My Field:

Head: Content Head Link: www.site.com

When click content head go to www.site.com

How can i do this?

1 Answer 1

2

Say you have two fields, title and link, in your view. Click the title field and exclude from display so it doesn't show. Then click the link field and rewrite results. Under rewrite results I think you can check BOTH "Rewrite the output of this field" and "Output this field as a link". In rewrite results text box, put in the replacement pattern [title] and in link path [link] (you can get a full list of replacement patterns below).

If that doesn't work just do a simple href in the rewrite results text box:

<a href="[link]">[title]</a> 

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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