11

How i add CTP Extension using following method but it is not worked can any one help me ?

  1. Open preferences.
  2. Select Miscellaneous tab.
  3. Select Files sub-tab thing.
  4. Click on New file extension and enter tpl.
  5. Select the mime type.
  6. Click ok. Done!
deceze
  • 510,633
  • 85
  • 743
  • 889
Dilip Godhani
  • 2,065
  • 3
  • 18
  • 33
  • 1
    In step 4, you write "Click on New file extension and enter **tpl**." Did you enter "tpl" or "ctp"? I downloaded and installed Netbeans, followed the instructions you posted (with the 'ctp' extension), and it worked great. – Daniel Wright Apr 26 '10 at 14:27

4 Answers4

34

Go to : Tools -> Options -> Miscellaneous -> Files

Then : Click on "New" -> Type in ctp -> Click "OK"

Associate with PHP text/x-php5

And you are finished.

Aman Mathur
  • 709
  • 2
  • 15
  • 27
user442616
  • 349
  • 3
  • 3
  • 6
    I guess you need to set "Associated File Type (MIME)" = "PHP Files (text/x-php5)" – rahul286 Jan 23 '12 at 08:43
  • No, you are **not** "*finished*." As of Netbeans 8.2, you *still* can not create a new file with the "ctp" extension. You can create a new file with any other extension, but it will not allow you to rename the file to a "ctp" extension. You basically need to create the file, then rename it from the OS. – UncaAlby Apr 08 '19 at 18:32
7

To add the ctp extension in netbeans

  • Go to Tools -> Options -> Miscellaneous -> Files

  • then click on "New" -> Type in ctp -> Click "OK"

  • After "Associated File Type (MIME)" -> select (text/x-php5) -> Click "OK"

Vayodya Tamari
  • 285
  • 2
  • 2
  • Same comment as above for @user442616. Netbeans will recognize the "ctp" file and syntax color it like a "PHP" file, but it still won't let you create a new file with a "ctp" extension from within the IDE. – UncaAlby Apr 08 '19 at 18:34
3

You could install plugin PHP CakePHP Framework and enable it for desired projects.

wnasich
  • 409
  • 4
  • 7
0

Create an empty file and then put your desired extension.

  • This doesnt work as Netbeans automatically creates the extension for you when you choose the file type – David Yell Oct 18 '11 at 19:45
  • Create an empty file with the desired extension in the desired directory/folder from the OS. Netbeans will not create the file for you, but it doesn't complain when it's there already. – UncaAlby Apr 08 '19 at 18:36