All actions/views will have same title.
Like=>
<?php $this->set('title_for_layout', 'mysite'); ?>
How can I set this title for all actions/views in CakePHP ?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
If you just want your site’s name to appear on every page; I would simply set it manually in your layout:
<title><?php echo $title_for_layout; ?> - My Site Name</title>that way you can have a dynamic title, and have your site’s name appear in the
<title>of the page.If you don’t want this, you could set the value in a
beforeFilterin yourapp_controller.php:This will give every action/view the title
My Site, and you can overwrite this on a per controller/action basis if needed.Your page title should really be unique for every page however (generally); so unless you have a reason for having the same title I would consider otherwise.