v:collection with v:if and v:pagination
  • In both PHP and VaeML examples in the documentation, v:if statements are nested inside the v:collection tag. This seems to be sometimes necessary in my experience, however, it also makes pagination inaccurate. In cases where you can't use predicate expressions in the collection tag to achieve the desired effect, is there an ideal way to use a v:if to filter and v:paginate to paginate properly?

    iterates through 24 collection items

    <v:collection path="items" id="itemCollection" paginate="24">

    15 of those items make it through the v:if

    <v:if path="filterResultsWithPHP(<v->)">

    pagination iterates by multiples of 24 when only 15 items are shown

    <v:pagination id="itemCollection" />

  • 2 Answers sorted by
  • Unfortunately, no. For that, you'd need to write your own tag in PHP. Sorry!

  • OK, would it be possible to get a few more examples of vae_register_tag in the docs? Specifically, a couple examples of customization of v:collection would be really helpful.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Sign In Apply for Membership

In this Discussion