I'm looking for a way to change the categories/subcategories displayed along with their records based on some sort of criteria. For example, If I have three categories - Cars, trucks, bicycles - I want the user to be able to select a button to control which of those categories is displayed. For example 2 wheel vehicles.
This would essentially give the user different "views" of the category hierarchy. I know I could have separate sections but some categories are in multiple views and I want the user to also have the ability to see the entire hierarchy. In this case I'm creating a hierachy of geoscience information and I want different parts of the hierarchy visible depending on the type of geoscientist viewing it but I also want them to see and search it all if they want.
One thing I have played with is using the template to accomplish this so I don't have to modify any core code. I used the meta keywords field of the category to assign terms to the category. Then in the cindex template, I check meta keywords for a specific term and if it doesn't exist, don't display the category. I do the same thing when displaying records (check meta keywords of parent category) because I get the full category path for each record before displaying it.
This works but I don't know how to make the matching term persist like filters do and pagination / record count doesn't work as normal.
The section in this case is fairly simple. The records don't belong to multiple categories and the category hierarchy is only 3 categories deep. records in multiple categories could complicate things a fair bit.
Any ideas or suggestions?
I'm looking for a way to change the categories/subcategories displayed along with their records based on some sort of criteria. For example, If I have three categories - Cars, trucks, bicycles - I want the user to be able to select a button to control which of those categories is displayed. For example 2 wheel vehicles.
This would essentially give the user different "views" of the category hierarchy. I know I could have separate sections but some categories are in multiple views and I want the user to also have the ability to see the entire hierarchy. In this case I'm creating a hierachy of geoscience information and I want different parts of the hierarchy visible depending on the type of geoscientist viewing it but I also want them to see and search it all if they want.
One thing I have played with is using the template to accomplish this so I don't have to modify any core code. I used the meta keywords field of the category to assign terms to the category. Then in the cindex template, I check meta keywords for a specific term and if it doesn't exist, don't display the category. I do the same thing when displaying records (check meta keywords of parent category) because I get the full category path for each record before displaying it.
This works but I don't know how to make the matching term persist like filters do and pagination / record count doesn't work as normal.
The section in this case is fairly simple. The records don't belong to multiple categories and the category hierarchy is only 3 categories deep. records in multiple categories could complicate things a fair bit.
Any ideas or suggestions?