BoldMinded acquires Ansel, support ending for all add-ons. BoldMinded acquires Ansel, support ending for all add-ons. Read More →
Support has been discontinued. Issues remain available as an archive. Support has been discontinued. Issues remain available as an archive.
Adding limit and offset parameters
#205 opened by Oliver Cannell (IC360)
Description
I'm trying to output details for a single category, for an Entry (ie. just the first one found with a specific Parent) like this:
{exp:category_construct:categories entry_id="{entry_id}" group_id="1" parent_id="14" limit="1"} {construct:cat_url_title} {/exp:category_construct:categories}
...but I've had to use the following additional PHP loop counter instead to only display one result:
{exp:category_construct:categories entry_id="{entry_id}" group_id="1" parent_id="14"}
<?php
if ($loop == 0) { echo "{construct:cat_url_title}"; }
$loop++;
?>
{/exp:category_construct:categories}
It would be awesome if could add 'limit' and 'offset' parameters, so we can more easily control what's displayed, in a similar manner as the standard EE parameters. :-)
Replies
- TJ Draper
Replied 8/28/2021 9:38 AM
Limit and offset is not (currently?) possible because of the way constructing parents and children works. In the next version of Construct I can try to take a look at this, but I'm guessing it may be difficult.