I am using Drupal 8.5.4 and Bootstrap Pagraphs. I have a custom module
foo and a custom paragraph type
Pub defined inside. In the template for
Pub, I usually
kint To inspect the content of the variable. It turns out that it has 17 properties, and any of them are the value of the field. The first 14 of them are in core / lib / Drupal / Core / Field, L # 89-102. The last 3 are
Digging into the object, I found the value of the field in
content.bar.0['#context'].value. Obviously, using this method to access a simple field value is nonsense, and I would rather not have to do this forever.
- Is there a simpler way to access the value of the field? I do not mind using a twig filter if necessary
- Is there any way to configure my paragraph types to pass the context to the template, instead of all the field data?