BuzzingPixel

Ansel for Craft

Ansel for EE

Treasury

Construct

Category Construct

Dashboard (open an issue here)

All Issues

My Issues

News Contact
Log in

Logged in as

Licenses Purchases Profile Change Password Billing Portal Admin
Log Out
Software
Ansel for Craft Ansel for EE Treasury Construct Category Construct
Support
Dashboard (open an issue here) All Issues My Issues
News Contact
Log in
Logged in as:
Licenses Purchases Profile Change Password Billing Portal Log Out
Dashboard All Issues My Issues
Support Dashboard
  1. Home
  2. Home
  3. Support Dashboard
  4. View Issue

Adding limit and offset parameters

#205 opened by Oliver Cannell (IC360)

Subscribe

Details

See Comments

Public Issue

Visibility: Public
1 reply
Last reply by TJ Draper
Created 8/25/2021 10:16 AM
Updated 8/28/2021 9:38 AM
Category Construct 2.2.0
CMS Version: EE 5.4.2
PHP Version: 7.2

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.

Use Markdown for formatting

Details

See Comments

Public Issue

Visibility: Public
1 reply
Last reply by TJ Draper
Created 8/25/2021 10:16 AM
Updated 8/28/2021 9:38 AM
Category Construct 2.2.0
CMS Version: EE 5.4.2
PHP Version: 7.2
Cookie Policy
Privacy Policy
Terms of Service

© 2023 BuzzingPixel, LLC. All rights reserved.