jd250 Posted September 10, 2019 Share Posted September 10, 2019 Hello. I'm using that code in header.tpl, for instance: {if $category->id == 12}<title>CUSTOM TITLE FOR CATEGORY 12</title>{else}<title>{$meta_title|escape:'html':'UTF-8'}</title>{/if} {if $category->id == 23}<title>CUSTOM TITLE FOR CATEGORY 33</title>{else}<title>{$meta_title|escape:'html':'UTF-8'}</title>{/if} It changes for each category the meta-title BUT also in all products inside that category. I think it's because products grabs category ID too. But I'm trying to fix that. Why I want to use this? Because I have many categories and in several ones, meta title + prestashop shop name is ok for SEO but I have two categories with long title and when category adds meta title, lenght are very long. So this is the reason why I want to force title in that categoris. In fact, I do this but with CMS id and it works ok {if $cms->id == 38}<title>My long customt itle</title>{else}<title>{$meta_title|escape:'html':'UTF-8'}</title>{/if} Do you know how can I fix that? Thanks! Link to comment Share on other sites More sharing options...
EvaF Posted September 13, 2019 Share Posted September 13, 2019 it depends which way the variable $category was created . Try to use$category.id_category instead of $category->id Link to comment Share on other sites More sharing options...
jd250 Posted September 24, 2019 Author Share Posted September 24, 2019 En 13/9/2019 a las 1:01 PM, EvaF dijo: it depends which way the variable $category was created . Try to use$category.id_category instead of $category->id Hello. It returns a blank page... not working Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now