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

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

1 Answer 1

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 and acknowledge you have read our privacy policy.

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