0

I'm trying to create this button in my views with a custom text, that needs to link to the current node.

I know you can use links and that works, but.. i need something like a variable that makes the link always go to the current node.

enter image description here

enter image description here

  • You can add field "path" to your view. – lamp5 May 25 '18 at 9:35
  • @lamp5 but.. it only shows the path? How to get it in a link? – Prezoncraft May 25 '18 at 11:25
  • You can Rewrite the output of the Path field to something like <a href="[path]">[title]</a>. – prkos May 25 '18 at 13:11
0

The field Content: Link allows you to enter Text to display.

  1. Add a new Field Content: Link
  2. Under Text to display enter Bestel nu

Easy :)

For more complex changes you can use the "Rewrite the output of this field" option on the "Content: Link" field. It's more reliable to use this field than Path.

You can use "Global: Custom text" field to construct some output (also "Rewrite the output of this field") using the tokens for the fields listed above it, but it isn't necessary in this case.

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.