Skip to main content

Documentation: Forecourt

Vehicle filter module

The Forecourt - Vehicle filter module lets visitors narrow down your stock by make, category, fuel type, body type, transmission, options, price, year and mileage, and sort the results. Filtering works on the overview page: the results update as soon as a visitor changes a filter.

Add the module

  1. Go to Content > Site Modules and click New.
  2. Choose Forecourt - Vehicle filter.
  3. Select a module position, for example a sidebar for the vertical layout or a position above the content for the horizontal layout.
  4. On the Menu Assignment tab assign it to your stock menu item.

Display

Layout Vertical stacks the filters, which suits a sidebar. Horizontal puts them in a row, which suits a filter bar above the vehicles.
Accordion Puts each filter group in a panel that visitors can open and close. Only for the vertical layout.
Show counts Puts the number of vehicles behind each option, like Audi (4). For mileage that is the number of vehicles up to that mileage. Off by default.
Visibility on detail page Shows the module on the vehicle detail pages too. Off by default, because a filter is mostly useful on the overview.

Filters

Every filter can be switched on or off separately.

Brand, Category, Fuel type, Body type, Transmission Show the filter, choose the style (checkboxes or a dropdown where visitors can pick several values) and, with the accordion, whether the panel starts open or closed. The available values come from the vehicles you have published. Category is the vehicle category, which matters most if you sell machinery.
Options & Accessories Off by default. Gives every options category in your stock its own filter, so Safety and Comfort each get a list of their options. A vehicle has to have all the options a visitor ticks. Imports can bring in hundreds of options, so Options per category cuts each list to the most used ones, 15 unless you change it. Style, dynamic options and the accordion setting are shared by all options categories.
Price A minimum and maximum price that the visitor types in. With dynamic options on, the empty fields show the lowest and highest price of the matching vehicles.
Year A from and until year, running from your oldest to your newest vehicle. With dynamic options on, the list shrinks to the years of the matching vehicles.
Mileage A maximum mileage. Steps without vehicles are left out.
Sort A sort order select at the bottom of the form, for example price or mileage, ascending or descending.

Dynamic options

A filter only lists options that have vehicles. A fuel type you do not stock is not in the list, and a filter with nothing to offer is hidden altogether.

Which vehicles count depends on the Dynamic options switch. Every filter except Sort has one.

Off (default) The options cover your whole published stock and stay the same while a visitor filters. Counts show the totals in stock.
On The options follow the other active filters. A visitor who picks Electric only sees the makes that have an electric vehicle, and the counts change along with the selection. All result pages are counted, not just the page on screen.

With the switch on, a filter still ignores its own selection. Pick Audi and the other makes stay in the list, otherwise a visitor could never add a second make.

Options & Accessories works the other way round. A vehicle has to have every option that is ticked, so ticking Air conditioning leaves only the options those vehicles have as well.

An option that is already selected always stays, even when the other filters leave it at 0 vehicles. The visitor needs it there to switch it off again.

Search engines and crawlers

Filtered result pages are marked as noindex, in the page and in a response header. That keeps hundreds of near-identical filter combinations out of the search results, while the main overview stays indexed.

Forecourt also keeps filter addresses out of the page itself. The filters are form fields, not links, and the page numbers of a filtered result have no address a crawler can follow. A crawler that starts on your stock page finds your vehicles and nothing else.

Some crawlers ignore noindex, and AI crawlers are known for it. To keep those away from filtered pages, add this line to the robots.txt of your site:

Disallow: /*filter_

It tells crawlers not to fetch filtered pages at all. The well-known AI crawlers, such as GPTBot and ClaudeBot, follow robots.txt. A crawler that ignores that too can only be stopped on the server, with rate limiting or a firewall rule.

A filtered address still works when you make one yourself. A link to all your electric cars looks like this: /stock?filter_fuel_type[]=Electric.