0

Long story short I have a client I’m currently working on an EE build for, they want a download page where by each download can be found by navigating through category and sub categories so on and so forth.

Now the issue I’m having is the functionality of expression engines categories module doesn’t seem to allow this kind of depth though it may well be me just getting things confused.

The structure for these categories they want is along the lines of the following:

  • Category 1
    • Sub Category 1
    • Sub Category 2
    • Sub Category 3
  • Category 2
    • Sub Category 4
      • Sub Sub Category 1
        • Final Sub Category 1
        • Final Sub Category 2
      • Sub Sub Category 2
      • Sub Sub Category 3
        • Final Sub Category 1
        • Final Sub Category 2
    • Sub Category 5
  • Category 3
  • Category 4
    • Sub Category 4
      • Sub Sub Category 1
        • Final Sub Category 1
        • Final Sub Category 2
      • Sub Sub Category 3
        • Final Sub Category 1
        • Final Sub Category 2
      • Sub Sub Category 4
    • Sub Category 5
    • Sub Category 6
  • Category 5

It’s a very complex category listing but despite advice the client is adamant on retaining this structure to order their downloads. Now as you can hopefully decipher from the above is that they have multiple sub categories of varying depths which can appear as children of multiple categories as well as other sub categories.

If I attempt this kind of category setup within the standard category module in EE I can easily add categories and sub categories but it’s when I get any deeper than this which causes issues as I cannot have multiple sub categories with the same name and to my knowledge there is no way to attach a sub category to multiple parent categories.

My question for all you super duper category experts out there is, Can this kind of category depth be achieved using EE with the multiple sub categories and the linking to multiple parents? And if not are there any addons or suggestions you have that can get me on the right tracks?

Thanks in advance for any comments and answers in reply to my inane babble :)

1 Answer 1

0

Is there any way tag-based navigation would work? If so, there are a number of add-ons you could look at.

If not, and if the problems you mentioned with using the native category structure render that out of the question, then I don't have a tried and true answer. However, just thinking out loud, it seems the Relationships feature might do what you're looking for.

It would be tricky to work out, but you might be able to set up a separate channel for your "categories." Your "Categories" channel would have a Grid field that would include a "ParentCategory" field, which would be a Relationship pointing at the Categories channel entries.

Because this is a Grid field, you'd be able to put in as many category relationships as you want for each - thus allowing sub-"categories" to have as many parent "categories" as necessary.

Your Downloads channel would also have a multi-select Relationships field pointing at your Categories channel entries.

Then you'd build your template with conditionals based on segments (holding "category" data) and show the Downloads entries and/or the Child "category" entries, as appropriate.

You could probably simplify your template considerably if it would be permissible to use a Javascript-based folding tree structure, which would allow you to output the full "category" structure at once rather than using conditionals to select what to show on a given pageload.

1
  • Hi Matthew, Thanks for the comments. In regard to tag-based navigation i had looked into this with devdemon and solspace both offering good options but it's the navigating through the categories from parent to deepest child that causes me my issues. Alas my client won't listen to reasoning behind simplifying the navigating of the downloads. I like the sound of your solution using a separate channel for the categories and will give that a look. Commented Oct 21, 2015 at 7:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.