Jump to content

Breadcrumb for Category title


Recommended Posts

Hi,

I want to keep the breadcrumb as it is, but I also want to add the parent category to the subcategory name on the category page.

For example, the parent category is "Women" and the subcategory is "Skirts". On the category page for the subcategory, I want to show: "Women: Skirts" as the title. It would be good if I can just show the immediate parent category in the case of sub-sub categories, but since there are no sub-subcategories at the moment, that is not so important.

I can use {$path} which works, but I want to use a colon (:) instead of the usual navigation pipe symbol (>). How can I do this? Or does anyone have a much better way of going about this?

Link to comment
Share on other sites

  • 2 weeks later...

You are making things difficult for yourself. What's wrong with the following?

Home > Women > Skirts

Why must it look like the following?

Home > Women: Skirts

You can try changing line 4 of breadcrumb.tpl from

<a href="{$base_dir}" title="{l s='return to'} {l s='Home'}">{l s='Home'}{if $path}{$navigationPipe|escape:html:'UTF-8'}{if !$path|strpos:'span'}{$path}{else}{$path}{/if}{/if}



to:

<a href="{$base_dir}" title="{l s='return to'} {l s='Home'}">{l s='Home'}{if $path}{$navigationPipe|escape:html:'UTF-8'}{if !$path|strpos:'span'}{$path|replace:' >':':'}{else}{$path|replace:' >':':'}{/if}{/if}



That should replace ' >' with ':'. That is the only thing I can think of without hacking PrestaShop, which will make upgrading in the future more difficult.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...