Rewriting a link field to link to 2 different places depending on what's given I have a content type which contains a website field of type "link." I am creating a view that should have the title which links to the content for each piece of content, unless a link is provided in the website field - then the title should link there.

This is what I am currently trying:


title field is hidden
website field results rewritten so that [title] is the text and it is outputted as a link to [field_website-url]. 
website field no results are set to go to: [title]


However, this method is not working. It works when there is actually a website URL specified in the website field, but for all others, clicking on the titles links to ".com/link].

Any help figuring this out would be greatly appreciated!
The problem lies in trying to use the 'link to original content' in 'no results'.

Try putting the fields in this order with these formats:


Title - just plain text
Link to content - raw URL
Website field - raw URL


Then set Rewrite Results to &lt;a href="[token for website]"&gt;[title]&lt;/a&gt;

And set No Results Behaviour to &lt;a href="[token for link raw URL]"&gt;[title]&lt;/a&gt;

Note you'll have to find the right token for the links in the Replacement Patterns section that shows up when you tick 'Rewrite the output of this field'

Don't use 'Output this field as a link' or the link will apply to the No Results Behaviour as well, I think.