Difference between revisions of "JReviews:ShortCodes"
From JReviews Documentation
Line 69: | Line 69: | ||
|} | |} | ||
+ | '''Examples''' | ||
+ | 10 top rated listings: | ||
+ | <pre> | ||
+ | [jreviews type="listings" listing_order="rating" columns="2" module_total="10" module_limit="10" show_numbers="1"] | ||
+ | </pre> | ||
+ | Latest listings from the category that has ID 23: | ||
+ | <pre> | ||
+ | [jreviews type="listings" listing_order="latest" category="23" module_total="6" module_limit="6"] | ||
+ | </pre> | ||
[[Category:JReviews]] | [[Category:JReviews]] | ||
[[Category:Modules]] | [[Category:Modules]] |
Revision as of 12:21, 14 September 2016
JReviews Shortcodes allow you to embed listings or reviews inside an article text.
For example, this shortcode would display a listing with an alias "westville-east":
[jreviews type="listings" listing-alias="westville-east" summary="1"]
Inside an article that shortcode displays this:
There are two types of shortcodes:
- listings - reuses the functionality of the Listings Module
- reviews - reuses the functionality of the Reviews Module
Listings shortcode
There are many parameters that you can use:
Parameter | Example | Description |
listing_order | listing_order="latest" | Available options: latest, rdate, rating, rrating, topratededitor, raviews, random, featuredrandom, rhits, proximity |
summary | summary="0" | 0 - disabled, 1 - enabled |
summary_words | summary_words="10" | Number of words |
show_category | show_category="0" | 0 - disabled, 1 - enabled |
fields | fields="jr_state,jr_city" | Comma separated list of custom fields to show |
editor_rating | editor_rating="0" | 0 - disabled, 1 - enabled |
user_rating | user_rating="1" | 0 - disabled, 1 - enabled |
tmpl_suffix | tmpl_suffix="_vertical" | Theme file suffix. The default theme used is /modules/listings.thtml |
tn_show | tn_show="1" | 0 - disabled, 1 - enabled |
tn_position | tn_position="left" | Available options: left, right, top, bottom |
tn_mode | tn_mode="scale" | Available options: crop, scale |
tn_size | tn_size="100x100" | Thumbnail size in WIDTHxHEIGHT format |
cat_auto | cat_auto="0" | 0 - disabled, 1 - enabled |
dir | dir="1" | Directory IDs |
category | category="22" | Category IDs |
listing | listing="51" | Listing IDs |
nav_position | nav_position="bottom" | Available options: bottom, side |
module_total | module_total="10" | Max. number of results |
module_limit | module_limit="5" | Results per page |
columns | columns="2" | Number of columns |
show_numbers | show_numbers="0" | 0 - disabled, 1 - enabled |
compare | compare="0" | 0 - disabled, 1 - enabled |
Examples
10 top rated listings:
[jreviews type="listings" listing_order="rating" columns="2" module_total="10" module_limit="10" show_numbers="1"]
Latest listings from the category that has ID 23:
[jreviews type="listings" listing_order="latest" category="23" module_total="6" module_limit="6"]