Introduction
This tutorial shows how to use Velocity code on your catalog to create a item level navigation / menu based on a catalog group for Products. This velocity code example is intended to be used with the Catalog templates:
Panel |
---|
Main Menu → Catalog → Choose the host → Manage Catalog Templates |
Sample Code
Code Block | ||||
---|---|---|---|---|
| ||||
#set($levelOnes = $group.getGroup('/products/').children) $formatHelper.sortByAttribute($levelOnes, 'sort_order', false) <div class="sidebar"> <h3><a href="$baseUrl/products/">Products</a></h3> <ul> #foreach($levelOne in $levelOnes) <li><a href="$baseUrl$levelOne.path">$escape.html($levelOne.title)</a></li> #end </ul> </div> |
Break Down
Now let's break down what each block is doing.
...