I have created a new custom content type: tw-how-to-guide
.
This is a simple content type that only has one field: a paragraph module. And this paragraph module contains:
- some nested paragraph modules
- a number list
I would like the contents of the custom node template to display exactly as it does today. I am only looking to make two changes:
- Wrap of the tw-how-to-guide content in a div with a css class
- based on the selected number from the number list, add an additional div below the wrapper div, with the same class.
I have created a template file: node--tw-how-to-guide.html.twig
However, this is not displaying anything. I have tried using kint, with the following:
<div class="printPage" >
{{ kint(content) }}
</div>
And I get the array in Kint, which is nice. However I do not wish to customize the display of the contents. I want the content to display as before. I am just interested in modifying the wrapping div.
I am concerned that I will need to recreate, or doing some complex work, to simply add some div tags.
I am really hoping this task can be done easily without having to parse each time in the array and call new templates. As I mentioned, it just adding a wrapper div, and then addition same divs based on selected number.
Any ideas on how to achieve this?