Jump to content

Meta title ohne shopname


Recommended Posts

ich denke, der User meint wie er den <title> Tag modifizieren kann, damit dort der SHopname raus ist?

 

normalerweise wird der Metatitile in /classes/Meta.php gebilder.methode getHomeMetas. In /override/classes mann man Meta.php erstellen und dorthin schreiben

 

<?php
class Meta extends MetaCore {
   public static function getHomeMetas($id_lang, $page_name) {
    $metas = Meta::getMetaByPage($page_name, $id_lang);
    $ret['meta_title'] = (isset($metas['title']) && $metas['title']) ? $metas['title'] : Configuration::get('PS_SHOP_NAME');
    $ret['meta_description'] = (isset($metas['description']) && $metas['description']) ? $metas['description'] : '';
    $ret['meta_keywords'] = (isset($metas['keywords']) && $metas['keywords']) ? $metas['keywords'] :  '';
    return $ret;
   }
}

 

falls die Seite einen eigenen Titel hat, wird er darstestelt, falls nicht, der Shopname wieder.

ohne Gewähr ;)

 

Gruß

Link to comment
Share on other sites

themes / your_theme / header.tpl

 

<title>{$meta_title|escape:'htmlall':'UTF-8'}</title>

 

{assign var=shop_name_to_trim value=" - $shop_name"}
<title>{$meta_title|replace:$shop_name_to_trim:''|escape:'htmlall':'UTF-8'}</title>

  • Like 2
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...