0

In drupal 8 when creating a view for taxonomy terms and add a field I enabled

Link to the Taxonomy term

option. The pathauto module is enabled so it gives following link:

<a href="/site/taxonomy/taxonomy-term" hreflang="en">Taxonomy Term</a>

But I want something like this:

<a href="/site/taxonomy/taxonomy-term" hreflang="en">Read More</a>

I have created a twig file views-view-field--my-region--name.html.twig as following:

{{ output -}}

I cannot go into more deeper with this setup. Can you help me to change the anchor text OR just get the taxonomy term url?

1 Answer 1

3

In your view just add the field 'Taxonomy term: Link to Taxonomy term' and change the 'Text to display' to Read more.

1
  • Thanks, this worked. Do you know the default machine name for this field? Commented Jul 17, 2017 at 4:20

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.