Monday 14 September 2020

Get blog details from article in Shopify

 Hello,
If you are fetching different articles by using some blocks, then you can use following code
Code: --------------------------
{% assign article = articles[block.settings.article] %}
        
{% assign splittedUrl = article.url | split:"/" %} 
        
{% assign blohHandle = splittedUrl[2] %}
        
{% assign blog = blogs[blohHandle] %}

Thanks

No comments:

Post a Comment

Infinite scroll on collection page in Shopify

 Hello, Collection page structure is as followed {% paginate collection.products by 48 %} <div class="collection-content"> ...