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 following Early Access features use Blade templates and PHP array language files:

  • New Listing Detail Page - Complete rewrite including media manager, comments/reviews, and addon integrations
  • New Listing Form - Rewritten form with integrated media uploads
  • PaidListings Checkout - New one-step checkout flow

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 Laravel's powerful templating engine. 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

Language System Overview

Early Access features use a new language system based on PHP arrays instead of .po files.

Language files are organized in the /resources/lang directory where each language has its own subdirectory:

  • Front-end strings: site.php
  • Admin strings: cp.php

Creating Language Overrides

To override language strings for Early Access features, create a PHP file that returns an array of your custom translations.

Global Overrides

These overrides apply to all Early Access features (both JReviews core and add-ons):

Joomla

/templates/jreviews_overrides/resources/lang/en/site.php

WordPress

/jreviews_overrides/resources/lang/de/site.php

Vendor-Specific Overrides

To keep your overrides organized by component, use vendor-specific paths:

Joomla

/templates/jreviews_overrides/resources/lang/vendor/jreviews/de/site.php
/templates/jreviews_overrides/resources/lang/vendor/mylists/de/site.php

WordPress

/jreviews_overrides/resources/lang/vendor/jreviews/en/site.php
/jreviews_overrides/resources/lang/vendor/mylists/en/site.php

Language Override Examples

Language keys use dot notation with nested arrays. Create a PHP file that returns an array with your custom strings:

<?php

return [
    'headings' => [
        'create_listing' => 'Neuen Eintrag erstellen',
    ],
    'status' => [
        'featured' => 'Empfohlen',
    ],
];

Example: Customizing Button Text

<?php

return [
    'actions' => [
        'save' => [
            'label' => 'Save Changes',
        ],
        'cancel' => [
            'label' => 'Go Back',
        ],
        'submit' => [
            'label' => 'Submit Now',
        ],
    ],
];

Example: Multi-language Site

For German translations in resources/lang/de/site.php:

<?php

return [
    'actions' => [
        'save' => [
            'label' => 'Speichern',
        ],
        'cancel' => [
            'label' => 'Abbrechen',
        ],
    ],
    'headings' => [
        'user_reviews' => 'Benutzerbewertungen',
    ],
    'status' => [
        'featured' => 'Empfohlen',
        'open_now' => 'Jetzt geöffnet',
    ],
];

Finding Language Keys

To find the language keys you need to override:

  1. Inspect the source templates - Look for {{ fwd__('jreviews::site.actions.save.label') }} or @lang('jreviews::site.actions.save.label') in Blade files
  2. Check core language files - Browse /resources/lang/en/site.php in JReviews or add-ons
  3. Use Theme Explorer - Enable it to see which templates are loaded, then check those templates for language strings

Example in a Blade template:

<button>{{ fwd__('jreviews::site.actions.save.label') }}</button>
<h2>@lang('jreviews::site.headings.user_reviews')</h2>

The namespace format is namespace::file.key_name:

  • jreviews:: - The namespace (component name)
  • site - The language file name (site.php)
  • actions.save.label - The nested key path

To override these, you only need the key paths in your override file:

  • actions.save.label
  • headings.user_reviews

Language Override Priority

The language system checks for translations in this order:

  1. Vendor-specific overrides - /lang/vendor/{component}/{lang}/site.php
  2. Global overrides - /lang/{lang}/site.php
  3. Core language files - Original files in JReviews or add-ons

This allows you to:

  • Override specific strings globally
  • Keep component-specific customizations organized
  • Fall back to core translations for non-customized strings

Disabling Overrides

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

This will disable:

  • Blade template overrides
  • Language file overrides
  • Legacy PHP file overrides

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