You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've been having issues with using any custom list items in loops within the PHP and Twig Patternlab. So far I have tried adding the JSON content both within the Pattern partials folders and also within the data folder but neither seem to be picked up within my templates and I get empty arrays rendering. I only seem to be able to use the standard data setup within the listitems.json in the data folder but even when I try to add new data to that file it still does not pick up. Is there something I am missing or is this possibly a bug?
I've been having issues with using any custom list items in loops within the PHP and Twig Patternlab. So far I have tried adding the JSON content both within the Pattern partials folders and also within the data folder but neither seem to be picked up within my templates and I get empty arrays rendering. I only seem to be able to use the standard data setup within the listitems.json in the data folder but even when I try to add new data to that file it still does not pick up. Is there something I am missing or is this possibly a bug?
JSON Data
{ "1" : { "coreplans" : { "id" : "silver", "plantitle" : "Silver", "summary" : "Some description text here for the silver level", "atoms-ticked" : { "one": "List item one", "two": "List item two", "three": "List item three", "four": "List item four" } } }, "2" : { "coreplans" : { "id" : "gold", "plantitle" : "Gold", "summary" : "Some description text here for the gold level", "atoms-ticked" : { "one": "List item one", "two": "List item two", "three": "List item three", "four": "List item four" } } }, "3" : { "coreplans" : { "id" : "platinum", "plantitle" : "Platinum", "summary" : "Some description text here for the platinum level", "atoms-ticked" : { "one": "List item one", "two": "List item two", "three": "List item three", "four": "List item four" } } } }
Twig loop within the template
{% for item in 1..3 %} <div class="col-sm-4"> {% include "molecules-block-plan" %} </div> {% endfor %}
Molecule block example
`
{% include "atoms-label-small" %}
{% include "atoms-h3" %}
{% include "atoms-paragraph" %}
{% include "atoms-ticked-plans" %}
Explore all {{ coreplans.plantitle }} benefits
{% include "atoms-button" %}
The text was updated successfully, but these errors were encountered: