Quantcast
Channel: Opinion: Shopify Community - Shopify Design
Viewing all articles
Browse latest Browse all 57838

Using either a custom field in collection or meta description inside collection view by creativereason

$
0
0

I have a client who needs two descriptions for their collections, one that is long and in HTML (pics, h2, h3s, etc), another that is just a blurb (used on the /collections page only). I couldn't find a way to add a custom field anywhere and figured an easy way to accomodate this with the existing fields is to utilize the meta desciption since that what this blurb is essentially. I couldn't find a way to get this working in my collection_listing. Right now, I'm trying this inside collection-listing.liquid (inside a collection loop): 

                  <h1 class="title"><a class="highlight align" href="{{ collection.url }}">{{ collection.title }}</a></h1>
                <a class="highlight align" href="{{ collection.url }}">
                {% if collection.image %}
                    {{ collection.image.src | collection_img_url: 'large' | img_tag: collection.image.alt }}
                {% else %}
                    {{ collection.products.first.featured_image | product_img_url: 'large' | img_tag: collection.image.alt }}
                {% endif %}
                </a>                  
                  {% if page_description != '' %}                  
                  <p>{{ page_description }}</p>
                  {% endif %}                  

 

No matter what is entered for the collection meta description I don't see anything (I see an empty paragraph). Any suggestions? TIA.

Is this approach off the wall? I figured this would be easier to maintain than parsing out a custom div from the main description. 


Viewing all articles
Browse latest Browse all 57838

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>