ProductCategory::NestedTitle PHP Method

NestedTitle() public method

Override the nested title defaults, to show deeper nesting in the CMS.
public NestedTitle ( integer $level = 10, string $separator = " > ", $field = "MenuTitle" )
$level integer nesting level
$separator string seperate nesting with this string
    public function NestedTitle($level = 10, $separator = " > ", $field = "MenuTitle")
    {
        $item = $this;
        while ($item && $level > 0) {
            $parts[] = $item->{$field};
            $item = $item->Parent;
            $level--;
        }
        return implode($separator, array_reverse($parts));
    }