Difference between revisions of "How does the JReviews Theme Engine work"

From JReviews Documentation
Jump to: navigation, search
Line 7: Line 7:
 
*<span style="color: blue">/components/com_jreviews/jreviews/views/themes/</span>  
 
*<span style="color: blue">/components/com_jreviews/jreviews/views/themes/</span>  
 
*the theme files have the .thtml extension.
 
*the theme files have the .thtml extension.
 +
  
 
In that folder you'll find several themes:
 
In that folder you'll find several themes:
Line 16: Line 17:
 
You will notice that '''/compact''' and '''/dark''' theme folders contain less files than the '''/default''' theme folder.
 
You will notice that '''/compact''' and '''/dark''' theme folders contain less files than the '''/default''' theme folder.
  
The '''/default''' folder contains all the necessary theme, css and image files, while '''/compact''' and '''/dark''' are variations of the default theme and contain only "modified" files and images. Files that don't exist in those folders are used from the '''/default''' theme folder.
+
The '''default''' theme is a "fallback" theme which contains all the necessary files, while '''/compact''' and '''/dark''' are variations of the default theme and contain only "modified" files and images. If a theme doesn't contain a certain file, JReviews will load that file from the default theme. That makes updating those themes easier.
  
This is because the '''/default''' theme should always be intact to make JReviews upgrades easier.
 
  
 
You can create your own theme the same way, but instead of creating it in <span style="color: blue">/components/com_jreviews/jreviews/views/themes/</span> folder, you should use the [[JReviews Code Overrides]] functionality to place your custom theme outside the '''/com_jreviews''' folder.
 
You can create your own theme the same way, but instead of creating it in <span style="color: blue">/components/com_jreviews/jreviews/views/themes/</span> folder, you should use the [[JReviews Code Overrides]] functionality to place your custom theme outside the '''/com_jreviews''' folder.

Revision as of 15:34, 18 August 2011

JReviews uses a php templating system. This means you can mix html with php code, which provides a lot of flexibility to create conditionals and add snippets of php code.


JReviews Themes

JReviews themes are located in this folder:

  • /components/com_jreviews/jreviews/views/themes/
  • the theme files have the .thtml extension.


In that folder you'll find several themes:

  • /components/com_jreviews/jreviews/views/themes/default/
  • /components/com_jreviews/jreviews/views/themes/compact/
  • /components/com_jreviews/jreviews/views/themes/dark/ - for using with dark joomla templates


You will notice that /compact and /dark theme folders contain less files than the /default theme folder.

The default theme is a "fallback" theme which contains all the necessary files, while /compact and /dark are variations of the default theme and contain only "modified" files and images. If a theme doesn't contain a certain file, JReviews will load that file from the default theme. That makes updating those themes easier.


You can create your own theme the same way, but instead of creating it in /components/com_jreviews/jreviews/views/themes/ folder, you should use the JReviews Code Overrides functionality to place your custom theme outside the /com_jreviews folder.