Page 1 of 1

HOW TO define page META tags from view file?

Posted: Dec 18th, '15, 20:22
by administrator
To define page META tags from view file or from controller you may use following code:

Code: Select all

   '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;