Stop Bard loop after first occurence of text in category pages

Here's the situation. I use Bard for blog post content with an additional Video set. So when I want to get blog content I loop through {{ blog_content }} like {{ if type == "text" }} ... {{ if type == "video" }} ... and so on.

It all works fine in a single blog post. But how do I get only the first occurence of TEXT in a category page (just to show few sentences of the introduction)? Before using Sets it was simple - like {{ blog_content | truncate:180:... }} . Now if I run the loop in the category page, I get every single paragraph. {{ blog_content }} {{ if type == "text" }} {{ text | truncate:180:... }} {{ /if }} {{ /blog_content }}

I'm sure there is a better solution if I only need FIRST "text" in a loop.

Thanks, Tomas

>>>>>>> Unanswered <<<<<<<
1 Reply