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

From JReviews Documentation
Jump to: navigation, search
 
(6 intermediate revisions by 2 users not shown)
Line 1: Line 1:
*.thtml files are php + html template files
+
JReviews themes use .thtml files which 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.
*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 code editors ==
  
== Some of the popular and free code editors/IDEs ==
+
* [http://notepad-plus-plus.org/ Notepad++] (Windows) - free
*[http://notepad-plus.sourceforge.net/uk/site.htm Notepad++] - recommended
+
* [http://www.barebones.com/products/textwrangler/ TextWrangler] (Mac) - free
*[http://www.contexteditor.org/ ConTEXT]
+
* [http://www.jedit.org/ jEdit] (Windows, Linux, Mac) - free
*[http://www.jedit.org/ jEdit]
+
* [http://www.sublimetext.com/ Sublime Text] (Windows, Linux, Mac) - commercial
*[http://www.activestate.com/komodo_edit/ Komodo Edit]
+
*[http://aptana.com/ Aptana]
+
*[http://www.netbeans.org/features/php/ NetBeans IDE]
+
  
 +
Most of the code editors will display .thtml files as regular text, without syntax highlighting by default, but in each of them you can enable PHP highlighting for .thtml files.
  
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 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):
 
 
<source lang="xml">
 
<Language name="php" ext="php php3 phtml thtml ctp" commentLine="//" commentStart="/*" commentEnd="*/">
 
</source>
 
 
 
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.
 
  
  
 
[[Category:Themes]]
 
[[Category:Themes]]
 +
[[Category:Tools]]

Latest revision as of 13:55, 6 January 2014

JReviews themes use .thtml files which 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 code editors

Most of the code editors will display .thtml files as regular text, without syntax highlighting by default, but in each of them you can enable PHP highlighting for .thtml files.