Prestsahop Meta title

1.2k Views Asked by At

I have create a custom module to display some images and text.I want to have a header for this module because I don't want to have the title frmo website.I need a individual title so I think I need to have a different header for this module or how can I have a title just for this module? The code for meta title is:

meta charset="utf-8" />
<title>{$meta_title|escape:'html':'UTF-8'}</title>
{if isset($meta_description) AND $meta_description}
<meta name="description" content="{$meta_description|escape:'html':'UTF-8'}" />
{/if}

So I will need the title to be My title

Can someone help me?

2

There are 2 best solutions below

0
On

Page that you have created with your module are presumably FrontControllers. Otherwise, existing pages already have their purpose and meta tags.

If you did use FrontController to create a Page, then you can input meta information for your page in SEO & URLs > SEO & URLs > Add. There you can input custom url-rewrite for your page and met info.

2
On

@gskema This is my php code for module :

if (!defined('_PS_VERSION_'))
exit;

class mymodule5 extends Module
{
    /* @var boolean error */
    protected $_errors = false;

    public function __construct()
    {
        $this->name = 'mymodule5';
        $this->tab = 'front_office_features';
        $this->version = '1.0';
        $this->author = 'author';
        $this->need_instance = 0;

        parent::__construct();

        $this->displayName = $this->l('mymodule5');
        $this->description = $this->l('Pagina livrare');
    $this->confirmUninstall = $this->l('Are you sure you want to delete this module?');
    }

    public function install()
   {
        if (!parent::install())
            return false;
        return true;
    }

    public function uninstall()
    {
        if (!parent::uninstall())
        return false;
    return true;
}

    public function countAllProducts()
    {
        return Db::getInstance()->getValue('SELECT COUNT(*) from        ps_product WHERE active = 1');
    }
    public function setMedia()
{
parent::setMedia();
$this->addCSS(__PS_BASE_URI__.'modules/'.$this->module->name.'/css/'.$this-    >module->name.'.css');

}  
}