This question already has an answer here:

Does somebody of you know how to build a link as described in #9 in https://www.drupal.org/project/views_contextual_filter_query/issues/2686467#comment-10983075

I tried it this way

<a href="node/{{ nid }}?{{ nothing_1 }}">[title]</a>

but the output ends with a "?" ... like me :-) The link to the node works, but the query/argument/contextual filter is missing in the url. How can I fix this?

marked as duplicate by leymannx, Pierre.Vriens, mradcliffe, 4k4 8 Apr 15 at 9:29

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.


Drupal offers a helper function for building URLs in Twig templates.

{{ url('entity.node.canonical', {node: nid}, {query: {foo: 'bar'}}) }}
  • Thank you very much, ya.teck, I will try that out! Best regards – J. Doe Apr 15 at 17:39

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