How to create the custom flash messages in the cakephp
1) First of all go to the -> app/View/Elements and create the ctp file for the flsah messages.like flash_error.ctp, flash_info.ctp, flash_success.ctp, flash_warning.ctp.
2) And add content in the ctp file like
<div>
<button type=”button” data-dismiss=”alert”>×</button>
<strong>Well done! </strong><?php echo h($message); ?>
</div>
3) And call the particular meassage like info,error,warning then call the “ $this->Session->setFlash(‘Your Profile Update Successfully’,'flash_success’); ” in cakephp controller.
1) First of all go to the -> app/View/Elements and create the ctp file for the flsah messages.like flash_error.ctp, flash_info.ctp, flash_success.ctp, flash_warning.ctp.
2) And add content in the ctp file like
<div>
<button type=”button” data-dismiss=”alert”>×</button>
<strong>Well done! </strong><?php echo h($message); ?>
</div>
3) And call the particular meassage like info,error,warning then call the “ $this->Session->setFlash(‘Your Profile Update Successfully’,'flash_success’); ” in cakephp controller.
No comments:
Post a Comment