Set Meta Title (Page Title) in CakePHP 1.2/1.3
Hello Friends,
As i mention in my previous posts, CakePHP 1.3 come up with lots of new syntax changes. I was looking for a Meta Title SEO tag for each page. I need to set this Meta Title (Page Title) for each page. You must be aware that Page Title can be set in method which we write in respective controller. Look at below syntax changes in CakePHP 1.2 and CakePHP 1.3 for setting Page Title.
CakePHP 1.2
$this->pageTitle = "Page Title Value";CakePHP 1.3
$this->set("title_for_layout","Page Title Value");
If you find any problem in this than let me know by comment.






I am
about 2 years ago
Pls tell me where to set page title. I am new to CaKePHP. visit my site and tell in which file I have to open and edit in my website.
about 2 years ago
Pls tell me where to set page title. I am new to CaKePHP. visit my site and tell in which file I have to open and edit in my website.
about 2 years ago
@GMAmin2010 , you can set this meta title for each page in particular method in your controller. Whatever you set in controller, you can show it in page layout.
about 2 years ago
@GMAmin2010 , you can set this meta title for each page in particular method in your controller. Whatever you set in controller, you can show it in page layout.
about 1 year ago
in controller using like dat
pageTitle = ‘Add New Record’;
/*
some process to do;
*/
}
?>
about 1 year ago
in controller using like dat
pageTitle = ‘Add New Record’;
/*
some process to do;
*/
}
?>