I use paragraphs with my content type. I need to show weight (order) value of each paragraph in my twig template. I can change weight with select box when I edit the node, but I can’t figure out how to get it in twig.
I thought it would be something like this:
function ws_preprocess_paragraph(&$variables) { $par = $variables['paragraph']; $myweight = $par->weight; }
Please help)