In Drupal 8 how do I alter the more link?

I need to give it a path which is based on a taxonomy id that is based on the current path (where the view is on) which has the taxonomy name in the path.

The current page also has a field which has this taxonomy name as a result. (but changes per page)


I'm trying to retrieve the taxonomy ID based on the taxonomy that is placed on the node and give the id to the more link

I am not sure if this is clear. But I have a views page with filters. And the taxonomies are the filters. Certain pages (theme pages) have their own taxonomy directed to it with a views block. The more link of that block links to the views page, I want the link to automatically check the filters of the taxonomy that is being used on these theme pages.


If I have understood your question, I have been needing the same thing. I solved it by means of:

1) add the field 'link to taxonomy term' and exclude it from visualization

2) format the description field as 'clipped version' (I am using right now a Spanish version of Drupal 8, not sure what the English option name is called)

3) rewrite the output for the description field as '{{ description__format }} {{ view_taxonomy_term }}'

That did the trick.

I hope that that's what you had asked, and that someone can take advantage of it.

EDIT: After re-reading your question, I realize that what I was trying to solve is different: a taxonomy terms view, which returns a list of terms, the description shortened to 160 chars, with a 'read more' link based in the taxonomy term's custom path (/path instead of /taxonomy/term/2).

Since I haven't been able to find an online answer to that, and given that google drove me to this question while trying to find an answer to mine, I think I could still leave this answer here. However, if the OP or some mod tell me to remove this answer, I gladly will.

| improve this answer | |

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.