Listings Relations

From JReviews Documentation
Revision as of 23:25, 16 July 2020 by Jreviews (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

In JReviews 2.3, you can create a new type of custom field: Related Listing. This feature is very useful when you want to accomplish "parent -> child" relationships between different listing types, for example:

  • Venues -> Events
  • Manufacturers -> Products
  • Artists -> Albums
  • Book Authors -> Books
  • TV Networks -> TV Shows
  • Movie Studios -> Movies

When you create a "child" listing type, you will be able to use a Related Listing custom field for that listing type, and then during the submission of the child listing, users will be able to select the existing "parent" listing.

The Related Listing custom field needs to be created only for child listings.

We will explain the "TV Networks -> TV Shows" listings relation in more details, but the same principle applies to all of the examples above.

TV Networks -> TV Shows Relation Example

Before the Related Listings feature was possible, if you wanted to create a review site about TV Shows, you would probably create a "TV Shows" listing type and several custom fields regarding TV Show details, for example:


In this case "TV Networks" is a single select custom field with TV Networks as field options: NBC, Fox, CBS, ABC, SyFy, ...

The link SyFy that you see in the picture above is a regular click2search link that will return a search result page of all tv shows that have SyFy field value selected.

But what if you want to create listings for TV Networks that will show more details about them and also let users review each TV Network and rate their program? That was also possible before, but now with the new Listing Relations Feature you can "connect" those TV Network listings with TV Show listings.

First, you would create a new "TV Networks" category in Joomla, create custom fields and listing type that will be used with TV Networks, and after that you would submit listings for each TV Network.

Then, for the TV Show listing, instead of using single select custom field to select Show's parent TV Network, you would create a Related Listing custom field:


When you go to the "Submit TV Show" page, the 'TV Network' custom field will list TV Network listings that you submitted (autocomplete will show listings after first few letters are entered):


Now, the SyFy link on the TV Show listing detail page is no longer a click2search link, it's a link to the SyFy listing detail page:


Displaying related listings on listing detail pages

Now that TV Network listings and TV Show listings are "connected", you can display related listings on detail pages using the Listing Detail Page Widgets.

On each TV Network listing detail page you can display all its TV Shows:


The Related Listing Widgets are using the same theme file as the Listings Module, so you can easily customize it to show any additional data and completely change the layout if you want.

On each TV Show listing detail page you can display other TV Shows from the same TV Network and display additional info regarding TV Network:


For more details on how to setup these widgets, read Listing Detail Page Widgets