JReviews logo Docs
Menu
Version

listing_detail_logo_options

Allows changing thumbnail generation options for the listing logo.

Filter
Listing Detail
Since 4.1.1

You need to have a working knowledge of Hooks before you get started.

Parameters

Name Type Description
$options parameter (array) associative array with thumbnail options (size, mode)
$listing parameter (array) associative array with current listing data

Boilerplate Code

Use the boilerplate code to start using the filter, and add your own logic to modify the first argument and return it.

Clickfwd\Hook\Filter::add('listing_detail_logo_options', function($options, $listing)
{
    // Uncomment line below to view available data passed into hook
    // fwd_dd($options, $listing);

    return $options;
});
Development & Support
Customizations are not included with support. We provide this information to make it easier for developers to extend the functionality. From time to time we may have some availability for custom work. Get in touch to see if there's an opportunity to work together.

Examples

Increase logo thumbnail size and change mode to scale

The default logo thumbnail size is 200x200 pixels and the image is cropped. The filter below will double the thumbnail size to 400x400 pixels (it won't affect the displayed size whcih is fixed using CSS). It also changes the mode to scale which can be useful for logos that are not square (although the listing detail header layout is optimized for square logos).

Clickfwd\Hook\Filter::add('listing_detail_logo_options', function($options, $listing) 
{
  	// Change the thumbnail dimensions
	$options['size'] = '400x400';
  
  	// Change thumbnail mode to scale
  	$options['mode'] = 'scale';

  	return $options;
});

Source Files

  • /views/themes/default/listings/detail_header.thtml