Difference between revisions of "How to edit .thtml theme files"

From JReviews Documentation
Jump to: navigation, search
Line 13: Line 13:
  
  
Most of the code editors will display .thtml files as regular text, without syntax highlighting, so you should configure your editor to recognize .thtml as php files.
+
Most of the code editors will display .thtml files as regular text, without syntax highlighting, therefore, you should configure your editor to recognize .thtml as php files.
  
 
=== Configuring Notepad++ ===
 
=== Configuring Notepad++ ===

Revision as of 14:28, 1 February 2011

  • .thtml files are php + html template files
  • To modify .thtml files, you need a text editor
  • Any text editor like notepad would work, but it's better to use more powerful code editors with syntax highlighting and other features


Some of the popular and free code editors/IDEs


Most of the code editors will display .thtml files as regular text, without syntax highlighting, therefore, you should configure your editor to recognize .thtml as php files.

Configuring Notepad++

When you open .thtml file in Notepad++, you can click on Language menu, choose PHP and you will get correct syntax highlighting. But that is not a permanent solution.

For a permanent solution you need to edit Notepad++ config files (in the installation directory):

In both langs.xml and langs.model.xml add thtml to the list of php extensions (line 136):

<Language name="php" ext="php php3 phtml thtml ctp" commentLine="//" commentStart="/*" commentEnd="*/">


Notepad++ will now automatically recognize .thtml files as php and apply syntax highlighting.

A similar process must be followed for other code editors and in some of them you can do it in the 'Options' menu without editing the configuration files.