How To Change The Title Tag In The Index.tpl

By default in the file your_template/templates/index.tpl:


```php {capture name=“title”}

{hook name=“index:title”}

{if $page_title}

{$page_title}

{else}

{foreach from=$breadcrumbs item=i name=“bkt”}

{if !$smarty.foreach.bkt.first}{$i.title|strip_tags}{if !$smarty.foreach.bkt.last} :: {/if}{/if}

{/foreach}

{if !$skip_page_title && $location_data.title}{if $breadcrumbs|count > 1} - {/if}{$location_data.title}{/if}

{/if}

{/hook}

{/capture}

{$smarty.capture.title|strip|trim nofilter} ```

And what we get in the frontend code: ```php Main category :: Subcategory :: Current category ```

What I need is to show only current category: ```php Current category ```

How can I change the code?

If you need to change title text on the Category page only, please open app\controllers\frontend\categories.php file and replace:



fn_add_breadcrumb($cats[$c_id], "categories.view?category_id=$c_id");




with



// fn_add_breadcrumb($cats[$c_id], "categories.view?category_id=$c_id");

Tnx for the answer. I actually do not want to change the breadcrumb, title only.

The title is generated from breadcrumbs. Try to replace:



{foreach from=$breadcrumbs item=i name="bkt"}
{if !$smarty.foreach.bkt.first}{$i.title|strip_tags}{if !$smarty.foreach.bkt.last} :: {/if}{/if}
{/foreach}




with



{foreach from=$breadcrumbs item=i name="bkt"}
{if ($runtime.controller == 'categories' && $smarty.foreach.bkt.last) || $runtime.controller != 'categories'}
{if !$smarty.foreach.bkt.first}{$i.title|strip_tags}{if !$smarty.foreach.bkt.last} :: {/if}{/if}
{/if}
{/foreach}