Jump to content

Meta title jméno eshopu na levé straně místo právé


Recommended Posts

V tomto souboru se dá podle všeho upravit jen home page webu, to se mi podařilo dostat jméno eshopu na levou stranu. Ale to je k ničemu, když to nefunguje pro produkty a kategorie, cms atd..

 

Podařilo se mi to ve funkci 

 

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') : Configuration::get('PS_SHOP_NAME');
 
a ten posledni radek nahradit
 
 $ret['meta_title'] = (isset($metas['title']) && $metas['title']) ? Configuration::get('PS_SHOP_NAME').' - '.$metas['title'] : Configuration::get('PS_SHOP_NAME');
 
Bohužel to funguje jen pro index home page... nějaky expert pres PHP?
Link to comment
Share on other sites

No nakonec se mi to podarilo udelat pro product page zamenou dvou promennych v poslednim radku:

 

    public static function completeMetaTags($meta_tags, $default_value, Context $context = null)
    {
        if (!$context) {
            $context = Context::getContext();
        }
 
        if (empty($meta_tags['meta_title'])) {
            $meta_tags['meta_title'] = Configuration::get('PS_SHOP_NAME').' - '.$default_value;
 
je treba si s tim asi pohrat
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...