Created
February 23, 2017 14:07
-
-
Save holisticnetworking/8d887773b510dccc6e499fe549542aa8 to your computer and use it in GitHub Desktop.
Overriding title
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// In AppController.php: | |
public function initialize() { | |
// Default title | |
$title = sprintf( | |
'%s: %s', | |
ucfirst( $this->name ), | |
$this->request->params['action'] | |
); | |
$this->set( 'title', $title ); | |
parent::initialize(); | |
} | |
// In PaymentTransactionController: | |
public function index() { | |
$title = 'Payment Transaction Search'; | |
$this->set( 'title', $title ); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment