I have a project running on CakePHP. All of my views are stored as ctp files. How do I render my ctp files so I have the same visual formatting that's present when I look at a file that is stored as a PHP file? In Notepad++, I was able to do this by selecting from the 'Language' toolbar option. Is there a similar feature in PHPStorm?
2 Answers
File | Settings | File Types, assign this extension to the PHP Files.
5 Comments
thaJeztah
any idea if this .ctp could be added in the default configuration for PhpStorm 6? Seems to be an easy thing to implement and would at least partially complete this issue; youtrack.jetbrains.com/issue/WI-760 :)
thaJeztah
I couldn't find an issue for this specifically, so I created one; youtrack.jetbrains.com/issue/WI-16723
Vaughany
File | Settings | Editor | File Types in PHPStorm 9.
CommaToast
On Mac: PhpStorm > Preferences > Editor > File Types > PHP ... kinda dumb that you have to put an asterisk and period in front of every file extension in the list (like when would it ever NOT have those)
guitarman
PHPStorm 2017.1 on MAC: Preferences - Editor - File and Code Templates - Files
In PHP Storm 2017: File | Settings | Editor | File Types
Add .ctp into PHP's Registered Patterns tab
Select PHP & In tab Registered Patterns > Click + > add .cpt
2 Comments
Md. Abutaleb
how to add .ctp into PHP'S registered patterns ? can you please help me?
Alex
Hi there, in tab Registered Patterns > Click + > add .cpt
