Difference between revisions of "Custom module positions in JReviews theme files"

From JReviews Documentation
Jump to: navigation, search
Line 1: Line 1:
 
== Adding custom module positions ==
 
== Adding custom module positions ==
  
in JReviews 2.4 it is possible to add custom module positions to any theme file.
+
You can create a custom module position in a JReviews theme file using this code:
 
+
The code to load a specific module position is:
+
  
 
<source lang="php">
 
<source lang="php">
 
<?php $Jreviews->loadModulePosition('user1'); ?>
 
<?php $Jreviews->loadModulePosition('user1'); ?>
 
</source>
 
</source>
 
  
 
Replace <span style="color: blue">user1</span> with the actual position name that you want.
 
Replace <span style="color: blue">user1</span> with the actual position name that you want.
 
  
 
== Assigning modules to default module positions in JReviews themes. ==
 
== Assigning modules to default module positions in JReviews themes. ==
  
JReviews 2.4 has some default module positions (useful for assigning modules with ads between listings and reviews):
+
JReviews has some default module positions (useful for assigning modules with ads between listings and reviews):
  
 
'''All list pages:'''
 
'''All list pages:'''
Line 47: Line 43:
 
=== Example ===
 
=== Example ===
 
To display a module below first listing on blogview page, edit the module in Module Manager and paste '''jr-blogview-below-listing1''' to the Position input:
 
To display a module below first listing on blogview page, edit the module in Module Manager and paste '''jr-blogview-below-listing1''' to the Position input:
 
 
  
 
[[File:CustomModulePosition1.png]]
 
[[File:CustomModulePosition1.png]]
Line 54: Line 48:
  
 
The module will be displayed like this:
 
The module will be displayed like this:
 
  
 
[[File:CustomModulePosition2.png]]
 
[[File:CustomModulePosition2.png]]

Revision as of 14:02, 9 September 2016

Adding custom module positions

You can create a custom module position in a JReviews theme file using this code:

<?php $Jreviews->loadModulePosition('user1'); ?>

Replace user1 with the actual position name that you want.

Assigning modules to default module positions in JReviews themes.

JReviews has some default module positions (useful for assigning modules with ads between listings and reviews):

All list pages:

  • jr-listpage-below-pagetitle
  • jr-listpage-below-map


Blogview list page:

  • jr-blogview-below-listing1
  • jr-blogview-below-listing2
  • jr-blogview-below-listing3


Tableview list page:

  • jr-tableview-below-listing1
  • jr-tableview-below-listing2
  • jr-tableview-below-listing3


Listing detail page:

  • jr-detail-below-fields
  • jr-detail-below-socialbookmarks
  • jr-detail-below-editorreviews
  • jr-detail-below-review1
  • jr-detail-below-review2
  • jr-detail-below-review3

All pages with a list of reviews

  • jr-reviewspage-above-reviews

Example

To display a module below first listing on blogview page, edit the module in Module Manager and paste jr-blogview-below-listing1 to the Position input:

CustomModulePosition1.png


The module will be displayed like this:

CustomModulePosition2.png