Category path Loop

Category path loop provides the path through the catalog to a given category. For example if we have an "alpha" category standing in an "alpha_father" category which itseflf belong to "root" category. Category path loop for category "alpha" will return "root" then "alpha_father" then "alpha".

{loop type="category-path" name="the-loop-name" [argument="value"], [...]}

Important informations :

* : argument is required
** : at least one of ** marked argument is required

Global arguments

Argument Description

Determine if loop is use in backend context.

default : false

example : backend_context="on"


force return result for i18n tables even if there is no record

default : false

example : force_return="on"


The maximum number of results to display.

example : limit="10"

name *

The loop name. This name must be unique and is used to reference this loop further in the page (see ifloop, elseloop or pageloop)


The first product to display offset. Will not be used if `page` argument is set.

default : 0

example : offset="1"


The page to display.

example : page="2"

Loop arguments

Argument Description
category *

A single category id.

example : category="2"


The max depth

example : depth="5"


Whatever we consider hidden category or not.

default : true

example : visible="false"

Global outputs

Variable Description
$LOOP_COUNT the current results index, starting from 1
$LOOP_TOTAL the total number of results returned by the loop

Loop outputs

Variable Description
$ID the category id
$PARENT the parent category
$TITLE the category title
$URL the category URL
I want to display a breadcrumb with parent categories.
<ul class="breadcrumb">
    {loop name="category_path" type="category-path" category="{category attr="id"}"}
        <span class="current">{$TITLE}</span>
        <a href="{$URL}">{$TITLE}</a>