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

Help getting selective display of child categories

#92 opened by JCOGS Design

Subscribe

Details

Complete

Public Issue

Visibility: Public
4 replies
Last reply by TJ Draper
Created 2/28/2018 12:34 PM
Updated 3/3/2018 1:57 PM
Category Construct 2.2
CMS Version: EE3.5.15
PHP Version: 7.1.2
MySQL Version: 5.6.38

Description

I am trying to get a category list to expand to show just the children of the currently active category.

Something like (if Cat 3 currently the active category)

-> Cat 1 -> Cat 2 -> Cat 3 (active) ---> Cat 3.1 ---> Cat 3.2 -> Cat 4 -> Cat 5

I can get this to happen using {construct.children} that shows all the sub-categories of all the top level categories, but cannot work out how to add a filter to only show the entries for the currently active category.

Grateful for any guidance you can offer about (a) whether this can be done and (b) if so, some clues as to how...

Thanks!

Replies

  • JCOGS Design

    Replied 2/28/2018 12:36 PM, Edited 3/3/2018 1:57 PM

    Grr... forgot the markdown for the example and can't seem to edit entry... so trying again...

    -> Cat 2 
    -> Cat 3 (active) 
    —-> Cat 3.1 
    —-> Cat 3.2 
    -> Cat 4 
    -> Cat 5```
    
  • JCOGS Design

    Replied 2/28/2018 12:37 PM, Edited 3/3/2018 1:57 PM

    OK - markdown fail sorry. Hopefully you can work out the general idea anyhow.

  • JCOGS Design

    Replied 2/28/2018 12:44 PM, Edited 3/3/2018 1:57 PM

    OK - found a way using Low seg2cat ... vis {if if construct:cat_level == 2 && segment_2_category_id == construct:parent_id}

    phew!

  • TJ Draper

    Replied 3/3/2018 1:57 PM

    Glad you found a way to do it. I wasn't quite following your first couple of demos. But if what you have is working, then we'll go with it! :)

Use Markdown for formatting

Details

Complete

Public Issue

Visibility: Public
4 replies
Last reply by TJ Draper
Created 2/28/2018 12:34 PM
Updated 3/3/2018 1:57 PM
Category Construct 2.2
CMS Version: EE3.5.15
PHP Version: 7.1.2
MySQL Version: 5.6.38
Cookie Policy
Privacy Policy
Terms of Service

© 2023 BuzzingPixel, LLC. All rights reserved.