Post by stefanleenheer » Thu Nov 23, 2017 6:19 pm

Hi,

because of some conflicting modules, the metadata on the homepage is not working (except title)
i want to hardcode the meta data in home.php , but don't know how to do it...

this is the code in home.php:
$this->document->setDescription($this->config->get('config_meta_description'));
$this->document->setKeywords($this->config->get('config_meta_keyword'));

now i would like it to be something like (i know this code is wrong):

$this->document->setDescription($this->'this is my description of the website');
$this->document->setKeywords($this->'keyword1, keyword2, etc');

somebody knows how to do this?
(about contacting module writers - most modules have expired support, so first i want to see if it is solvable without paying extra)

thanks


Posts

Joined
Tue Oct 31, 2017 9:33 pm

Post by paulfeakins » Thu Nov 23, 2017 6:35 pm

If you want to hardcode it then common/header.tpl is where you could do it, but you would be better to fix the real problem of conflicting modules.

UK OpenCart Hosting | OpenCart Audits | OpenCart Support - please email info@antropy.co.uk


User avatar
Guru Member
Online

Posts

Joined
Mon Aug 22, 2011 11:01 pm
Location - London Gatwick, United Kingdom

Post by stefanleenheer » Thu Nov 23, 2017 6:59 pm

in header.tpl the metadata is used on every page.
this is all working.
i only need the homepage metadata because everything else is working, so header.tpl is no option.

in my opinion it should be possible to set the metadata in home.php but not getting a variable, just code it
only i don't know how to do that
thanks


Posts

Joined
Tue Oct 31, 2017 9:33 pm
Who is online

Users browsing this forum: No registered users and 301 guests