Nicolas Patrouillaul Posted June 16, 2017 Share Posted June 16, 2017 Hi ! I would like to know how to call in the "meta-description" 's content -> the short description of the product page. I want an automatic meta-description and to put the short description of the product as the meta description for product page. I tried this : but it's not working : {if $page_name =='product' } <meta name="description" content="{$short_description|truncate:150:"...":true} - {$shop_name|strip_tags}" /> {/if} Can someone help me please Link to comment Share on other sites More sharing options...
cristic Posted June 17, 2017 Share Posted June 17, 2017 Try this way: {if $page_name == 'product' && isset($product)} <meta name="description" content="{$product->description_short|truncate:150:"...":true} - {$shop_name|strip_tags}" /> {elseif isset($meta_description) AND $meta_description} <meta name="description" content="{$meta_description|escape:'html':'UTF-8'}" /> {/if} 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