Cédric Girard Posted February 18, 2009 Share Posted February 18, 2009 HelloI have a little problem in my tag pages search engine optimization in my last shop (a full personal template => Master Materiel, always in development). The problem is that tag pages aren't optimized for SEO (no meta fields filled, lack of text in the page...) and that's why I wanted to fill all META fields as Title, Description and Keywords.The Meta Title field works fine with this code : $smarty->assign('meta_title', $mytitle); For the Meta description, I tried this code but it doesn't works : $smarty->assign('meta_description', $mydescription); (this code is in header.php, in the root of the shop ; you can detect the tag pages by $_GET['tag'] value...)The interest of Description Meta field is to give to Google (and other search engines) the text for the snippet, below the title (which is usually the Meta Title !) ; there isn't any interest for positioning the page in the search engine result page. But it gives a better ClickThrough Rate on the result page !So that's my question : how to assign the meta_description value ? Link to comment Share on other sites More sharing options...
Cédric Girard Posted February 20, 2009 Author Share Posted February 20, 2009 Up :blank: Is it possible to assign this variable ??? Link to comment Share on other sites More sharing options...
Cédric Girard Posted March 22, 2009 Author Share Posted March 22, 2009 HelloI have found the source of the problem : in french we use accents on characters... And it seems that Smarty doesn't like accents on values affected on variables :roll: When I erase all accents, it works fine ! Link to comment Share on other sites More sharing options...
Cédric Girard Posted May 11, 2009 Author Share Posted May 11, 2009 UP !The solution !!! It seems the solution is to convert to UTF-8 all texts before assign it in the Smarty variable ;-) $smarty->assign('meta_description', mb_convert_encoding($mydescription, "UTF-8")); Works fine Link to comment Share on other sites More sharing options...
CMMC Posted October 19, 2010 Share Posted October 19, 2010 Bonsoir,Je reviens sur le postJ'ai remarqué que sur les sites "cuisine" vous aviez le nom du fabricant dans le TITLE comment faites-vous cela ?Merci pour l'aide Link to comment Share on other sites More sharing options...
Cédric Girard Posted October 19, 2010 Author Share Posted October 19, 2010 BonsoirSauf erreur, on peut définir cela en modifiant un fichier, mais je ne sais plus lequel (bah oui ça date un peu lol)Ceci étant dit, comme j'utilise essentiellement des modifs "en dur" dans le header.php pour le SEO (prochainement une série d'articles très complets à ce sujet sur mon site/blog, qui va se transformer pour l'occasion !) cela me pose très peu de soucis... Link to comment Share on other sites More sharing options...
Recommended Posts