Using a antler variable as counter #6164
-
Hi guys, Im trying to use a variable to keep the count of the amount of collection posts my replicator block called "Overzicht" spits out. The code i've got;
It seems like it doesn't work like this, the offset variable gets reset every 'pagebuilder' block. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
What you have looks valid to me and should work. What version of Statamic are you using? I could replicate this behavior on 3.3.12 and below (but not on 3.3.13). |
Beta Was this translation helpful? Give feedback.
-
Hi Johnathon thanks for replying, Weird you've got it working on 3.3.12, thats the version I am using. It could be that you didn't quite understand what I'm trying to do, so I added a screenshot. The 4, 5, 6 in red is what I was expecting. But like I said, the offset variable keeps resetting to 0 after each pagebuilder/replicator block. |
Beta Was this translation helpful? Give feedback.
What you have looks valid to me and should work. What version of Statamic are you using? I could replicate this behavior on 3.3.12 and below (but not on 3.3.13).