How to edit .thtml theme files

From JReviews Documentation
Revision as of 14:29, 1 February 2011 by Jreviews (Talk | contribs)

Jump to: navigation, search
  • .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; in some of them you can do it in the 'Options' menu without editing the configuration files.