Shopify/theme-tools

Make sure you can loop through sections groups

Opened this issue · 2 comments

Is your feature request related to a problem? Please describe.
Some of our clients wants a sections with quick links to sections on the page. I've created a section group to group the sections that they can refer to.

Describe the solution you'd like
I'd like to loop through those section to automatically create a list of links with the referenced sections with the corresponding ID's.

Describe alternatives you've considered
A section with blocks with settings to add an ID and label. Also add the option to add an ID to the sections in the group. This will cause problems and inconsistencies.

Checklist

  • I have checked and made sure that the proposal adheres to this plugin's principles

👋 Hi @stijns96, thanks for the suggestion!

When you think about this feature, is this what you have in mind?

{% for section in section_group.sections %}
  {{ section.id }}
{% endfor %}

Thanks again for submitting this suggestion!

Hi @karreiro,

You're welcome!

Yeah, something like that would be good. You probably have to check what is possible, but since they are json files, it should be possible.