Skip to main content
Post Reopened by Pierre.Vriens, DRUPWAY, avpaderno
improved formatting and grammar
Source Link
avpaderno
  • 97.9k
  • 15
  • 164
  • 284

How to usecan I field rewrite on twigto a url - how torewrite a URL?

I've spent hours for searching, but I found nothing. I need the modified URL to call a view with contextual filter, in Drupal 8. The URL must include the value of a field, that the user's clicking on.

This works:.

<a href="{{ url('view.testview.page_1', {'arg_0': field_example__value}) }}">Link to Testview</a>

How can I overwrite "Link to Testview"Link to Testview with the field value?

--> {{field_example__value}}{{field_example__value}} works as well.

How to use field rewrite on twigto a url - how to?

I've spent hours for searching, but I found nothing. I need the modified URL to call a view with contextual filter. The URL must include the value of a field, that the user's clicking on.

This works:

<a href="{{ url('view.testview.page_1', {'arg_0': field_example__value}) }}">Link to Testview</a>

How can I overwrite "Link to Testview" with field value?

--> {{field_example__value}} works as well.

How can I field-rewrite a URL?

I need the modified URL to call a view with contextual filter, in Drupal 8. The URL must include the value of a field, that the user's clicking on.

This works.

<a href="{{ url('view.testview.page_1', {'arg_0': field_example__value}) }}">Link to Testview</a>

How can I overwrite Link to Testview with the field value?

{{field_example__value}} works as well.

solved
Source Link

I've spent hours for searching, but I found nothing. I need the modified URL to call a view with contextual filter. The URL must include the value of a field, that the user's clicking on.

This works:

<a href="{{ url('view.testview.page_1', {'arg_0': field_example__value}) }}">Link to Testview</a>

How can I overwrite "Link to Testview" with field value?

--> {{field_example__value}} works as well.

I've spent hours for searching, but I found nothing. I need the modified URL to call a view with contextual filter. The URL must include the value of a field, that the user's clicking on.

This works:

<a href="{{ url('view.testview.page_1', {'arg_0': field_example__value}) }}">Link to Testview</a>

How can I overwrite "Link to Testview" with field value?

I've spent hours for searching, but I found nothing. I need the modified URL to call a view with contextual filter. The URL must include the value of a field, that the user's clicking on.

This works:

<a href="{{ url('view.testview.page_1', {'arg_0': field_example__value}) }}">Link to Testview</a>

How can I overwrite "Link to Testview" with field value?

--> {{field_example__value}} works as well.

added more information
Source Link

Put field value How to use field rewrite on twigto a url - how to?

I've spent hours for searching, but I found nothing. I need the modified URL to call a view with contextual filter. The URL must include the value of a field, that the user's clicking on.

Note: The view returns a field, token says This works: [node: field_betreuer].

<a href="{{ url('view.testview.page_1', {'arg_0': field_example__value}) }}">Link to Testview</a>

How docan I get the content of this field appending to the URL? "%" or "$" does not seem to work. It must be easyoverwrite "Link to transfer the contents of thisTestview" with field to the URL, isn't it? How to write thisvalue?

Put field value to a url - how to?

I've spent hours for searching, but I found nothing. I need the modified URL to call a view with contextual filter. The URL must include the value of a field, that the user's clicking on.

Note: The view returns a field, token says: [node: field_betreuer]. How do I get the content of this field appending to the URL? "%" or "$" does not seem to work. It must be easy to transfer the contents of this field to the URL, isn't it? How to write this?

How to use field rewrite on twigto a url - how to?

I've spent hours for searching, but I found nothing. I need the modified URL to call a view with contextual filter. The URL must include the value of a field, that the user's clicking on.

This works:

<a href="{{ url('view.testview.page_1', {'arg_0': field_example__value}) }}">Link to Testview</a>

How can I overwrite "Link to Testview" with field value?

deleted 1 character in body
Source Link
Pierre.Vriens
  • 36k
  • 40
  • 50
  • 182
Loading
Integrate comments from OPer (below the existing answer)
Source Link
Pierre.Vriens
  • 36k
  • 40
  • 50
  • 182
Loading
Post Closed as "Needs details or clarity" by Kevin, avpaderno
Source Link
Loading