Hello There,
I have a problem with the Products module I cannot solve.
I have a single level hierarchy.
1. fruits
2. vegetables
3. sauce
I have a page called "My offer" that pages content is {Products}
Now If I click on my main menu on "My offer" I get a list out of all products regardless of the categories.
I need to show only the ones that are in fruits!
can you please help me out, how to achieve this?
thanks
Products module - default hierarchy to show
- paulbaker
- Dev Team Member
- Posts: 1465
- Joined: Sat Apr 18, 2009 10:09 pm
- Location: Maidenhead, UK
- Contact:
Re: Products module - default hierarchy to show
Look in the module help and you will see
So you need(optional) hierarchy="" - Used in the default and hierarchy actions this parameter has two uses. When used in the default (summary) action, this parameter specifies that only items in that location of the hierarchy should be displayed. Wildcard character can be used so that you can specify parent/child relationships as well. i.e {Products hierarchy='trucks*'} will create a summary report of all trucks, including the children in the hierarchy. Similarly, {Products hierarchy='*trucks'} will display a summary report of all trucks, and all items beloging to any parent in the hierarchy. A comma separated list of expressions can be supplied. i.e: {Products action=hierarchy hierarchy='trucks,cars'}
Code: Select all
{Products hierarchy="fruits"}
Re: Products module - default hierarchy to show
Hello Paul,
thank you for your reply. I did fiddle with it before posting, but my problem was that it did not show the category set as default. In other words it didn't reflect that active hierarchy item in my hierarchy report template.
The $active_hierarchy is empty, but it should have the order number of fruits in the hierarchy,
so, if I use your solution and set a default hierarchy item to show. My hierarchy report template breaks because it doesnt now in which hierarchy item we are...
Greets
Nikolas
thank you for your reply. I did fiddle with it before posting, but my problem was that it did not show the category set as default. In other words it didn't reflect that active hierarchy item in my hierarchy report template.
The $active_hierarchy is empty, but it should have the order number of fruits in the hierarchy,
so, if I use your solution and set a default hierarchy item to show. My hierarchy report template breaks because it doesnt now in which hierarchy item we are...
Greets
Nikolas