I have created view as block and in block twig template i can print view fields as content['#view'].field['field_machine_name'].value(row) HOw can i print text in textarea that i set as header and footer for this view.


if you want to display view header or footer in twig template, look at core views-view.html.twig and all the available variables. In your case :

header: The optional header.

footer: The optional footer.

In your twig views-view--[view-name].html.twig, you can display your variable like this :

<p>{{ header }}</p>

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.