Publisher does not support the Fluid field type. Please do not contact asking when support will be available.
If you purchased an add-on from expressionengine.com, be sure to visit boldminded.com/claim to add the license to your account here on boldminded.com.
Ticket: Retrieve count outside of specific block tag
Status | Resolved |
Add-on / Version | Bloqs 3.3.0 |
Severity | |
EE Version | 3.5.11 |
Ron Hickson
Nov 15, 2017
Description:
It would be useful to get the block count and total outside of the molecule tag pair.
For example:
{my_bloq_field}
{my_bloq_field:count}
{my_bloq_field:total_rows}
{my_bloq_content}
{heading}
{/my_bloq_content}
{/my_bloq_field}
It seems that the count and totals are only available inside the
{my_bloq_content}
. I’m trying to achieve an “every 2nd block show this” logic. While it could be done inside each molecule that just feels like a lot of redundant code and parsing.
BoldMinded (Brian)
Its already a thing:
total_rows and total_blocks are actually the same thing.
:count is traditionally used while in a loop, so {my_bloq_field:count} won’t be of any use outside of a tag pair loop.
Did you see the documentation? https://eebloqs.com/documentation/templates
Ron Hickson
Thanks Brian. Can the count be retrieved inside the Bloq field loop? Unless I’m missing something
only works in the molecule tag.
BoldMinded (Brian)
No, sorry. Bloqs doesn’t parse anything that is inside of the main field tag pair, but outside of a block.