How do I restrict the output of a collection to a subcategory?
I've created a test category with three subcategories:
- Pink and Purple
perch_collection('faqs', [ 'category'=> 'faqs/' . perch_get('cat') . '/' . perch_get('subcat'), 'template' => '_faq/faq--list-category.html', ]);
The code half works as expected.
Pink subcategory shows both the contents of
Pink and Purple
Pink and Purple and
red subcategories only show the contents of that subcategory - they work as expected.
How do I restrict the output to just the subcategory selected?
Here's a screencast showing the problem: https://recordit.co/94HAcBOYZg
I thought perhaps I could use a
value but I can't get them to work. The screenshot below shows the
showall from faq--list-category.html used in my
This is the
showall from faq--list-category.html
- PHP 7.0.22 is up to date
- MySQL 5.6.35 is up to date
- Image processing available
Perch Runway: 3.0.14, PHP: 7.0.22, MySQL: mysqlnd 5.0.12-dev - 20150407 - $Id: b5c5906d452ec590732a93b051f3827e02749b83 $, with PDO Server OS: Darwin, cgi-fcgi Installed apps: content (3.0.14), assets (3.0.14), categories (3.0.14), perch_blog (5.6.1), perch_forms (1.10) App runtimes: <?php $apps_list = [ 'perch_forms', 'perch_blog', ]; PERCH_LOGINPATH: /perch PERCH_PATH: /Users/stephen/Repositories/my-site/cms/perch PERCH_CORE: /Users/stephen/Repositories/my-site/cms/perch/core PERCH_RESFILEPATH: /Users/stephen/Repositories/my-site/cms/perch/resources Image manipulation: GD PHP limits: Max upload 32M, Max POST 32M, Memory: 128M, Total max file upload: 32M F1: 3b606135b33e6a102526838f4152a807 Resource folder writeable: Yes SCRIPT_NAME: /perch/core/settings/diagnostics/index.php REQUEST_URI: /perch/core/settings/diagnostics/ DOCUMENT_ROOT: /Users/stephen/Repositories/my-site/cms HTTP_HOST: my-site.local