Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
By javichuteck on
I need to create a select with the results of all elements of a particular content-type.
The results of all the elements of said content-type I get them like this:
{{drupal_view ('areas_practicas', 'areas_all')}}
But it generates preformatted results (with HTML in between) (or with the output of the development mode, with reference to the template that uses that sample)
- 1) Is it possible to return only one array of strings to be able to paint them in the select, without HTML or anything?
- 2) Is it possible to traverse the results of this block since twig?
Something like
{% For area in drupal_view ('areas_practicas', 'areas_all')%}
{{area.title}}
{% endfor%}