Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save shrmnk/044a9563b86ef2d93934 to your computer and use it in GitHub Desktop.
Save shrmnk/044a9563b86ef2d93934 to your computer and use it in GitHub Desktop.
Capitalize automatic type/vendor collection title in Brooklyn

What does this do?

You notice that the page heading for vendor and type collection pages (/collection/vendors?q=<vendor> or /collection/types?q=<type>) are not capitalized.

Alt text

You want it capitalized:

Alt text

Instructions

  1. Open Snippets\collection-template.liquid

  2. Look for

    <h1>{{ collection.title }}</h1>
  3. Replace with

    <h1>{% if collection.current_type %}Type: {{ collection.title | capitalize }}{%elsif collection.current_vendor %}Vendor: {{ collection.title | capitalize }}{% else %}{{ collection.title }}{% endif %}</h1>
  4. Save - You're Done!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment