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?
Asked
Active
Viewed 2.4k times
43
-
Just a note: https://youtrack.jetbrains.com/issue/WI-16723 – mark Jun 13 '19 at 14:23
2 Answers
90
File
| Settings
| File Types, assign this extension to the PHP Files
.

CrazyCoder
- 389,263
- 172
- 990
- 904
-
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; http://youtrack.jetbrains.com/issue/WI-760 :) – thaJeztah Feb 15 '13 at 22:16
-
1I couldn't find an issue for this specifically, so I created one; http://youtrack.jetbrains.com/issue/WI-16723 – thaJeztah Feb 15 '13 at 22:27
-
9
-
4On 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) – CommaToast Feb 27 '16 at 17:26
-
PHPStorm 2017.1 on MAC: Preferences - Editor - File and Code Templates - Files – guitarman Sep 12 '17 at 08:58
20
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

Alex
- 3,646
- 1
- 28
- 25
-
how to add .ctp into PHP'S registered patterns ? can you please help me? – Md. Abutaleb Oct 04 '17 at 05:32
-
2