Snippets with: section variables
When building custom themes, it's sometimes useful to have a custom section with separate content for multiple similar pages across a site.
For example, consider building a custom page header as a custom section in Shopify:
You could create custom page templates, and in each page template say ```page.why-us```, call a section for example ```custom-header-why-us```.
However, this quickly poses a maintenance challenge as the markup is duplicated for each section (which we don't need), as well as the data and schema (which we do).
To get around this, you can have multiple sections all calling the same snippet, which is then responsible for the presentation and markup of all of those sections.
For example, the setup for 3 custom pages with custom headers would be:
page.custom1 -> section-custom-header-1
page.custom2 -> section-custom-header-2
page.custom3 -> section-custom-header-3
Each section can set up as essentially a passthrough module, where it only checks for the existence of variables, and then passes those through to the singular snippet which renders the data for all sections, depending upon which page you are on.