Tags in a collection

  • Hi Hussein,


    Yes, I was thinking I might just use a second category set.


    I wonder, would there be any reason to not include all the categories in one category set? I guess it'll be more of a user interface issue than limiting any filtering I might need to do with multiple category sets.


    I'm working on website that needs quite a few nested sub categories, just trying to decide the best way to structure them.


    Thanks for the reply!

  • would there be any reason to not include all the categories in one category set?

    I always suggest to use what makes more sense to the content structure. If it makes sense in your use-case to have them all in one category set, I'd do that. Otherwise I'd use two sets.


    If tags need to be their own thing, then a second category set makes sense.


    limiting any filtering I might need to do with multiple category sets.

    Using multiple sets won't affect the way Perch filters items by categories. You can filter by multiple categories from different sets at the same time:


    PHP
    1. perch_collection('Blog', [
    2. 'category' => ['blog/news/', 'tags/some-tag-slug/']
    3. ]);