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?

3

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

  • Thanks, this worked. Do you know the default machine name for this field? – Janaka Dombawela Jul 17 '17 at 4:20

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.