liquid icon indicating copy to clipboard operation
liquid copied to clipboard

Is this possible?

Open blg002 opened this issue 12 years ago • 1 comments

I have an array of posts, each of which have a category. I want to only display 3 posts from categories 1,2, or 3 (there's potentially unlimited categories). Is there any way to do this with core liquid?

I figure I could do this if there were for comparisons or limits on if statements.

blg002 avatar Mar 28 '14 21:03 blg002

use a for loop on the array with a limit https://github.com/Shopify/liquid/wiki/Liquid-for-Designers#for-loops.

In future, this is not the place to ask questions, please use stackoverflow (http://stackoverflow.com/questions/tagged/liquid) or the shopify design forum (https://ecommerce.shopify.com/c/ecommerce-design)

dylanahsmith avatar Mar 29 '14 19:03 dylanahsmith