mariner Posted January 17, 2012 Share Posted January 17, 2012 How can I place the name of site before the page title? Currently, it’s like this: [Page title] – [My site.com]. I’m looking for a way to make it look like this: [My site.com] – [Page title]. I would like to implement this change to all pages on my site not just the front page. Link to comment Share on other sites More sharing options...
El Patron Posted January 17, 2012 Share Posted January 17, 2012 sorry, not sure I understand correctly. Are you wanting to change your url's? If not could you post a snapshot of what you want to accomplish? Link to comment Share on other sites More sharing options...
mariner Posted January 17, 2012 Author Share Posted January 17, 2012 Just like what you see in the attachment. I’m looking for a way to place “PrestaShop Forums” before “Place title before site name.” So the final result would look like this PrestaShop Forums – Place title before site name – Mozilla Firefox. Link to comment Share on other sites More sharing options...
El Patron Posted January 18, 2012 Share Posted January 18, 2012 You will need to update classes/tools.php to do this. Upon review of the code, you will need to change code in several different places. You may want to post in the modules sections of the forum to see if anyone has developed a module to do this. For example there are modules that do this for joomla. here is a link to a previous inquiry for similar subject as yours. Link to comment Share on other sites More sharing options...
idofri Posted December 15, 2012 Share Posted December 15, 2012 (edited) these changes worked for me (v.1.5.2): /classes/Meta.php: line 217: $ret['meta_title'] = (isset($metas['title']) && $metas['title']) ? $metas['title'].' - '.Configuration::get('PS_SHOP_NAME') : Configuration::get('PS_SHOP_NAME'); to: $ret['meta_title'] = (isset($metas['title']) && $metas['title']) ? Configuration::get('PS_SHOP_NAME').' - '.$metas['title'] : Configuration::get('PS_SHOP_NAME'); line 276: $row['meta_title'] = $title.$row['meta_title'].(!empty($page_number) ? ' ('.$page_number.')' : '').' - '.Configuration::get('PS_SHOP_NAME'); to: $row['meta_title'] = Configuration::get('PS_SHOP_NAME').' - '.$title.$row['meta_title'].(!empty($page_number) ? ' ('.$page_number.')' : ''); line 278: $row['meta_title'] = $row['name'].(!empty($page_number) ? ' ('.$page_number.')' : '').' - '.Configuration::get('PS_SHOP_NAME'); to: $row['meta_title'] = Configuration::get('PS_SHOP_NAME').' - '.$row['name'].(!empty($page_number) ? ' ('.$page_number.')' : ''); line 281: $row['meta_title'] = $title.(!empty($page_number) ? ' ('.$page_number.')' : '').' - '.Configuration::get('PS_SHOP_NAME'); to: $row['meta_title'] = Configuration::get('PS_SHOP_NAME').' - '.$title.(!empty($page_number) ? ' ('.$page_number.')' : ''); lines 310-311: $row['meta_title'] = ($row['meta_title'] ? $row['meta_title'] : $row['name']).(!empty($page_number) ? ' ('.$page_number.')' : ''); $row['meta_title'] .= ' - '.Configuration::get('PS_SHOP_NAME'); to: $row['meta_title'] = Configuration::get('PS_SHOP_NAME'); $row['meta_title'] .= ' - '.($row['meta_title'] ? $row['meta_title'] : $row['name']).(!empty($page_number) ? ' ('.$page_number.')' : ''); line 339: $row['meta_title'] = $row['meta_title'].' - '.Configuration::get('PS_SHOP_NAME'); to: $row['meta_title'] = Configuration::get('PS_SHOP_NAME').' - '.$row['meta_title']; line 363: $row['meta_title'] = $row['meta_title'].' - '.Configuration::get('PS_SHOP_NAME'); to: $row['meta_title'] = Configuration::get('PS_SHOP_NAME').' - '.$row['meta_title']; line 387: $row['meta_title'] = $row['meta_title'].' - '.Configuration::get('PS_SHOP_NAME'); to: $row['meta_title'] = Configuration::get('PS_SHOP_NAME').' - '.$row['meta_title']; line 403: $meta_tags['meta_title'] = $default_value.' - '.Configuration::get('PS_SHOP_NAME'); to: $meta_tags['meta_title'] = Configuration::get('PS_SHOP_NAME').' - '.$default_value; Edited December 15, 2012 by idofri (see edit history) Link to comment Share on other sites More sharing options...
Recommended Posts