I want to define the width of a table that will contain 1-3 columns, defined by a repeater.
I could use loop.length to get the number of items in the loop, but I don’t want to repeat the whole table, just the nested table within it.
Is there a method for finding the number of items in a loop without first creating the loop?
What I’ve tried: creating a loop outside of the containing table and just using it to set the width variables, then closing the loop, with my actual loop for buiding the columns nested inside that table.
I’ve since learned that I can’t call variables created within a loop, outside of that loop.
Here’s my code (some code from the link selector has been removed for simplicity):
Both options look doable, but is the second more useful if I my templates have several of these repeater blocks? ie, I can define the object once and reuse it more easily?