In this section you will learn how to:
By default, the system contains two display templates:
1.
|
/templates/[Theme Name]/classifieds/listing_info.tpl is used to display brief information on listings. E.g., such pages as Search Results, My Listings, Browse by Make Model, Browse by Body Style use this template.
|
2.
|
/templates/[Theme Name]/classifieds/listing_details.tpl is used to display full information on listings. E.g., such pages as Listing Details, Print Listing use this template.
|
The administrator can add (or delete) fields to these templates to display changes on corresponding pages.
Add a Field to the Search Results Page
To add a field to the Search Results Page, e.g. the 'Doors' field after the 'Drive Type' field:
•
|
Open /templates/[Theme Name]/classifieds/listing_info.tpl
|
•
|
Locate the following code:
|
{if $listing.DriveType}
{if $comma}, {/if}
{$listing.DriveType}
{assign var=comma value=true}
{/if}
This code displays the value of the 'Drive Type' field. (Pic.5.)
•
|
After this code, insert the following lines:
|
{if $listing.Doors}
{if $comma}, {/if}
{$listing.Doors}
{assign var=comma value=true}
{/if}
These lines display the value of the 'Doors' field. (Pic.5.)

Pic.5. Modified Search Results Page.
Note: The above changes to the 'Search Results' page will be also displayed on the 'My Listings', 'Browse by Make Model', 'Browse by Body Style' pages.
Add a Field to the Listing Details Page
Suppose, we need to add a field to the Listing Details Page. We add the 'Engine Displacement' field after the 'Fuel Type' field. It is assumed that we have already created the 'Engine Displacement' field via the admin panel:
•
|
Open /templates/[Theme Name]/classifieds/listing_details.tpl
|
•
|
Locate the following code:
|
<tr><td><b>Fuel Type:</b> {$listing.FuelType}</td></tr>
This code displays the 'Fuel Type' field (its caption and value). (Pic.6.)
•
|
After this code, insert the following lines:
|
<tr><td><b>{$form_fields.EngineDisplacement.caption}:</b> {$listing.EngineDisplacement}</td></tr>
This code displays the 'Engine Displacement' field (its caption and value). (Pic.6.)

Pic.6. Modified Listing Details Page.
Note: The above changes to the 'Listing Details' page will be also displayed on the 'Display Listing' and 'Print Listing' pages.
Delete a Field from a Listing Display Template
If you want to delete a listing field from a listing display template, find the code which displays the caption and value of this listing field and delete it from the file.
|