Jump to content

How can I define search Result Page Title. It is shows empty.


Usman Ahmed

Recommended Posts

  • 2 years later...
  • 11 months later...

You can define in header.tpl some like this:
 

{if $page_name == 'search'}
<title>Search {if isset($search_query) && $search_query}{$search_query|escape:'html':'UTF-8'}{elseif $search_tag}{$search_tag|escape:'html':'UTF-8'}{elseif $ref}{$ref|escape:'html':'UTF-8'}{/if} {if isset($smarty.get.p)}Page {$smarty.get.p} - {/if}{$meta_title|escape:'html':'UTF-8'}</title>
{else}
<title>{$meta_title|escape:'html':'UTF-8'}</title>
{/if}

It will show in the search results page, the input query or tag, and also add pagination to avoid duplicated titles.

  • Like 1
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...