0

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?

3

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.