JReviews logo Docs
Menu
Version

Customizing Early Access Features

Learn how to customize templates and language strings for Early Access features

Overview

Early Access features in JReviews 6 use a modern customization system that differs from the legacy JReviews 3/5 approach:

  • Templates: Blade .blade.php files instead of .thtml files
  • Language: PHP arrays instead of .po files
  • Location: Files in /resources directory instead of /jreviews and /locale

For information about the legacy systems, see:

Important
Features not rewritten in Early Access continue using the legacy systems. Only customize Early Access templates and language when you have enabled those specific features.

Which Features Use the New System

The modern Early Access page rewrites use Blade templates and PHP array language files. This includes the core listing detail, listing form, comparison, directory, listing-list, advanced-search, comments/reviews, discussions, media, and reviewer-rank pages, plus their modern components.

Installed add-ons can extend the same system. Current examples include PaidListings checkout, account, and plans; ListingResources resources pages; UserProfiles account and profile pages; EngageUsers stream, inbox, and preferences; and the Maps full-page map.

This list changes as more pages are modernized. Use the Early Access screen to see the switches registered on your installation, then use Theme Explorer to confirm the template system used by a specific page.

Template Overrides

Template Locations

Unlike the legacy theme system, Blade templates are organized by feature area in the /resources/views directory.

Creating Template Overrides

To override a Blade template, copy it to the overrides directory using the exact same folder structure found in the source.

Joomla

templates/jreviews_overrides/resources/views/

WordPress

jreviews_overrides/resources/views/

After adding new template overrides, clear the registry cache from the JReviews administration.

Theme Suffixes

Theme suffixes allow you to have different versions of the same template for different sections of your site.

To create a suffixed version of a template, append the suffix to the filename before .blade.php like detail_cars.blade.php

Blade Templating Basics

Blade is the powerful templating engine used by JReviews 6. Here are the essentials for JReviews customizations:

Displaying Variables

{{ $listing->title }}
{{ $listing->summary }}
{{ $listing->getFieldText('jr_customfield') }}

Conditionals

@if ($listing->featured)
    <div class="featured-badge">Featured</div>
@endif

@if ($user->canEdit($listing))
    <a href="{{ $editUrl }}">Edit</a>
@else
    <p>You cannot edit this listing</p>
@endif

Loops

@foreach ($listings as $listing)
    <h3>{{ $listing->title }}</h3>
    <p>{{ $listing->summary }}</p>
@endforeach

@forelse ($comments as $comment)
    <div>{{ $comment->text }}</div>
@empty
    <p>No comments yet</p>
@endforelse

Raw Output (Unescaped HTML)

{!! $listing->description !!}

Use {!! !!} only for trusted content. Always use {{ }} for user-generated content to prevent XSS attacks.

Comments

{{-- This is a Blade comment and won't appear in HTML --}}

Discovering Templates

JReviews 6 includes an updated Theme Explorer that now works with both legacy .thtml templates and new Blade .blade.php templates.

To discover which templates are used on a page:

  1. Enable Theme Explorer in Configuration → General
  2. Optionally set your IP address in the field below to show output only to you
  3. Visit any page with JReviews content
  4. View the template paths displayed on the page

Theme Explorer shows:

  • The complete filepath to all templates loaded on the page
  • The PHP controller and method used for the request
  • Whether templates are loaded from core JReviews or your overrides

This makes it easy to identify exactly which Blade template files you need to override for Early Access features.

Language Overrides

Early Access features use a modern language system based on PHP array files (site.php for the front-end, cp.php for the admin) instead of legacy .po files. Like template overrides, language overrides are incremental — you define only the strings you want to change.

The full reference for the Early Access language system, including override locations, resolution priority, language detection, and examples, lives on a dedicated page:

Full Language Documentation
See Languages & Localization for the complete guide to overriding strings on Early Access pages.

Disabling Overrides

For troubleshooting purposes, you can temporarily disable template overrides in Configuration Settings - General by setting Disable Overrides to Yes.

This will disable:

  • Blade template overrides
  • Legacy .thtml template overrides and legacy PHP file overrides

This allows you to test if an issue is related to your template customizations.

Language Overrides Are Not Affected
This setting does **not** disable language file overrides. To stop a `site.php` / `cp.php` override from taking effect, remove or rename the override file and clear the cache. See Languages & Localization for details.