Customizing the Search Results Page
This tutorial explains how to customize the search results page in Finder. To achieve this we use Joomla's layout override system. You need to be able to create new files and edit them on your web hosting site using FTP or other tools that are available to you (contact your web host if you need more information).
All file paths are relative to the directory in which Joomla is installed. When looking a files you need to create, it is assumed that you will create the necessary folders if they don't already exist in each case. The directory default_template refers to the template that is set as the default for your site. Please replace this name with the actual name of the template directory.
For more information on layout overrides, see http://www.theartofjoomla.com/topics/layout-overrides.html
The Search View (Default Layout)
The default layout search view is divided into three parts: the default layout, the form layout and the results layout.
The Default Layout (default.php)
This layout is very simple. It just defines the structure around which the search form and the search results are displayed.
To customize the default layout, find the file:
/components/com_finder/views/search/tmpl/default.php
Copy this to:
/templates/default_template/html/com_finder/search/default.php
Make any adjustment you need to structural elements that contain the search form and the search results.
The Form Layout (default_form.php)
This layout defines the code required for the search form to operate correctly. The layout contains significant Mootools-based Javascript code that should not be altered unless you know what you are doing. The view method _getGetFields inlcudes a number of hidden fields that are required for reliable searching.
The search term is defined by the input field with the name of "q".
To customize the default layout, find the file:
/components/com_finder/views/search/tmpl/default_form.php
Copy this to:
/templates/default_template/html/com_finder/search/default_form.php
Make any adjustment you need to the form as required.
The Results Layout (default_results.php)
This layout produces the list of matching results for the search term.
To customize the default layout, find the file:
/components/com_finder/views/search/tmpl/default_results.php
Copy this to:
/templates/default_template/html/com_finder/search/default_results.php
Make any adjustment you need to structural elements that contain the search form and the search results.
No problem, support subscriptions give you access to one-on-one help from real Joomla experts.