Apothecary Index

{% comment %} Apothecary Index — Card Layout (Section) Renders blog articles from the "Apothecary Index" blog as responsive cards with search & A–Z filter. Requires: Shopify 2.0 theme (e.g., Dawn). Assign this section to a normal Page. Settings: - blog_handle: which blog to use (default: apothecary-index) - show_search, show_az, show_tags, show_images {% endcomment %}
{% if section.settings.heading != blank %}

{{ section.settings.heading }}

{% endif %} {% if section.settings.subheading != blank %}

{{ section.settings.subheading }}

{% endif %} {% assign the_blog = blogs[section.settings.blog_handle] %} {% if the_blog == nil %}

The blog handle {{ section.settings.blog_handle }} was not found. Create a blog with this handle or change it in the section settings.

{% else %} {% assign articles = the_blog.articles | sort: 'title' %} {% if section.settings.show_search or section.settings.show_az %}
{% if section.settings.show_search %} {% endif %} {% if section.settings.show_az %} {% endif %}
{% endif %} {% if articles.size == 0 %}

No ingredient entries yet. Add posts to the {{ the_blog.title }} blog.

{% endif %} {% endif %}
{% schema %} { "name": "Apothecary Index (Cards)", "settings": [ { "type": "text", "id": "heading", "label": "Heading", "default": "Apothecary Index" }, { "type": "text", "id": "subheading", "label": "Subheading", "default": "Explore ingredients in our formulations." }, { "type": "text", "id": "blog_handle", "label": "Blog handle", "default": "apothecary-index" }, { "type": "checkbox", "id": "show_images", "label": "Show images or letter placeholders", "default": true }, { "type": "checkbox", "id": "show_tags", "label": "Show tag badges", "default": true }, { "type": "checkbox", "id": "show_search", "label": "Enable search", "default": true }, { "type": "checkbox", "id": "show_az", "label": "Enable A–Z filter", "default": true } ], "presets": [ { "name": "Apothecary Index (Cards)" } ] } {% endschema %}
``