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

From JReviews Documentation
Jump to: navigation, search
Line 1: Line 1:
 
*.thtml files are php + html template files
 
*.thtml files are php + html template files
*to modify .thtml files, you need a text editor
+
*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
+
*Any text editor like notepad would work, but it's better to use more powerful code editors with syntax highlighting and other features
  
  
Line 19: Line 19:
 
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.
 
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 permanent solution you need to edit Notepad++ config files (in the installation directory):
+
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):
 
In both '''langs.xml''' and '''langs.model.xml''' add thtml to the list of php extensions (line 136):
Line 30: Line 30:
 
Notepad++ will now automatically recognize .thtml files as php and apply syntax highlighting.
 
Notepad++ will now automatically recognize .thtml files as php and apply syntax highlighting.
  
Similar process is for other code editors and in some of them you can do it in the 'Options' menu without editing configuration files.
+
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.
  
  
 
[[Category:Themes]]
 
[[Category:Themes]]
 
[[Category:Tools]]
 
[[Category:Tools]]

Revision as of 17:11, 30 August 2010

  • .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, so 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.