Hi,
I'm using Perch Runway and I'm trying to create a side menu using perch_categories([ });
I currently have 2 layers (each with their own template) that work fine but want to extend this to 4 and really would appreciate some help/guidance.
This is what I have currently in a layout template which specifies the templates for each layer:
Code
- perch_categories([
- 'set' => 'products',
- 'template' => 'sidebar',
- 'filter' => 'catParentID',
- 'match' => 'eq',
- 'value' => '0',
- 'each' => function($item) {
- $item['subs'] = perch_categories([
- 'set' => 'products',
- 'template' => 'sidebar_subs',
- 'filter' => 'catParentID',
- 'match' => 'eq',
- 'value' => $item['catID']
- ], true);
- return $item;
- }
- ]);
Once again any help would be very much appreciated.
Daz