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?

Comments

hiramanpatil’s picture

Add new field in your taxonomy term view called 'Link to Taxonomy term'. In configuration add 'Text to Display' value as 'Read More' in given input text-field and save the field settings and view.

This will show the 'Read More' text with taxonomy term link.

Thanks,

unknownuser221’s picture

Sorry, but there is no field for value 'Text to Display'. Please can you explain more?

hiramanpatil’s picture

In field configuration pop-up there are options like:-

Create a label - checkbox
Place a colon after the label - checkbox
Exclude from display - checkbox

Text to display - Input field

Make sure that you have added link field to configure this.

Thanks,