Jump to content

If conditional not working


Recommended Posts

Hello, I used that code (Inside HEADER.TPL)

{if $category->id == XX}<title>MY CUSTOM TITLE FOR THAT CATEGORY</title>{else}<title>{$meta_title|escape:'html':'UTF-8'}</title>{/if}

For use CUSTOM Title in only one special category... It works but all products inside that category gets the title, not the product title... I don't know how can I fix that.

Example: Title in category XX -----> "Special Offers T-Shirts Adidas - MyWebPage"

Title in all products inside that category ---> "Special Offers T-Shirts Adidas - MyWebPage"

 

That's weird...

Edited by jd250 (see edit history)
Link to comment
Share on other sites

  • 3 months later...
On 5/6/2019 at 4:36 PM, Rolige said:

Hello:

You can check for the page name too. Example:


{if $page.page_name == 'category'}

 Regards

Hello and sorry for the delay in the answer.

I can't use that code. 

For instance I want to put something like this in HEADER.TPL

if category id 23 -> show this title (Only in Category Title)

if category id 33 -> show this title (Only in Category Title)

 

For instance.

 

In meta title i want to quit Prestashop shop title BUT not in all categories meta-titles...

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...