HOW TO define page META tags from view file?
Posted: Dec 18th, '15, 20:22
To define page META tags from view file or from controller you may use following code:
or directly (only from view file):
Also, if you need to define some variable from view file, that will be visible on default page or header, you may define in view file in following format:
and show it on template file with:
Code: Select all
Website::setMetaTags(array(
'title'=>'Page Title',
'keywords'=>'your, keywords, here',
'description'=>'Page Description',
));
or directly (only from view file):
Code: Select all
$this->_pageTitle = ';
$this->_pageKeywords = ';
$this->_pageKeywords = '';
Also, if you need to define some variable from view file, that will be visible on default page or header, you may define in view file in following format:
Code: Select all
$this->siteTitle = A::t('portal', 'Buyer Login');
and show it on template file with:
Code: Select all
echo $siteTitle;