How To Change The Title Tag In The Index.tpl

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


{capture name="title"}<br />
{hook name="index:title"}<br />
{if $page_title}<br />
	{$page_title}<br />
{else}<br />
	{foreach from=$breadcrumbs item=i name="bkt"}<br />
		{if !$smarty.foreach.bkt.first}{$i.title|strip_tags}{if !$smarty.foreach.bkt.last} :: {/if}{/if}<br />
	{/foreach}<br />
	{if !$skip_page_title && $location_data.title}{if $breadcrumbs|count > 1} - {/if}{$location_data.title}{/if}<br />
{/if}<br />
{/hook}<br />
{/capture}<br />
<title>{$smarty.capture.title|strip|trim nofilter}</title>
```<br />
<br />
And what we get in the frontend code: ```php
<title> Main category  :: Subcategory  :: Current category </title>
```<br />
<br />
What I need is to show only current category: ```php
<title> Current category </title>
```<br />
<br />
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}