Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
 
  • What is a .ctp file used for in CakePHP?

    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 667
    Comment on it

    CakePHP provides user to do advance view designing and making custom architecture for designing, for quick web developments. The CTP file extension is associated with the CakePHP. Ctp file contains template CakePHP template. It is as same as a view file that can load on web browser as html and can functioning with controllers also Moreover .ctp files can be used as architecture to hold the model of view and its layouts


    By default CakePHP view files are written in plain PHP and have a default extension of .ctp (CakePHP Template). These files contain all the presentational logic needed to get the data it received from the controller in a format that is ready for the audience youre serving to. If youd prefer using a templating language like Twig, or Smarty, a subclass of View will bridge your templating language and CakePHP.

                                                                              By- http://book.cakephp.org

    You change the extension .ctp to .php for views to set the $ext property for specific controller

     $this->ext = '.php';
    

    or

    public $ext = '.php';
    

    Normal you can store this file at /app/View/Products/view.ctp.

 0 Comment(s)

Sign In
                           OR                           
                           OR                           
Register

Sign up using

                           OR                           
Forgot Password
Fill out the form below and instructions to reset your password will be emailed to you:
Reset Password
Fill out the form below and reset your password: