New Template Preparations

The Smarty implementation is used to reduce the complexity of some of our extensions by presenting a HTML layer which can be modified to alter the display, but this alone cannot guarantee a risk free development, so we recommend you take some measures before creating/tweaking your template.

And one important note is: Never modify the default template!

Cloning a Template


Before starting to tweak your template, you should use the clone feature on the Default Template that comes installed with Swap Factory. Anything can go wrong when writing code, editing files, transferring files and who knows what. Loosing or corrupting one of the templating files can lead to downtime on your website on the corrupted areas of the extension.

This is why we recommend you use the clone feature on the Default Template: it creates a copy of the Default Template, which we test and offer support for. The Default template will always include all available features and will provide a solid foundation to start a new template from.

How it's done

In the Administrator area → Swap Factory → Settings → Themes Manager

Click the checkbox of the Default Theme and click Clone Theme . Now you will have to enter the name of the new folder, the new theme name and also a Description. After you save, a new Theme(Template) will be created along with it's new folder in the frontend template directory.

You can now switch between the default template and your clone template with just one click. Any number of clones can be created.

Swap Factory Templating Documentation

Swap Factory uses the powerful Smarty engine for templating. Bellow you have a list with all the template files currently used in Swap Factory (version 2.x.x) along with the variables you will find in these template files. Please note that files and code may change between versions. If updating Swap Factory, template files should remain unchanged.

The path to them is: …\components\com_bids\templates\[theme_name]\

Templating files used:

  • t_details_ad.tpl ⇒ Contains the template for displaying the Swap Item details page
  • t_categories.tpl ⇒Display of Categories page (Category Directory)
  • t_catselect.tpl ⇒ Category selection page
  • t_editad.tpl ⇒ This is the template for the “new ad” and “edit” page
  • t_listads.tpl ⇒ Template for displaying the ads lists
  • t_reportad.tpl ⇒ Auction reporting page display
  • t_myuserdetails.tpl ⇒ User's profile display
  • t_userdetails.tpl ⇒ Display of other user's details
  • t_myads.tpl ⇒ Display my ads
  • t_mywatchlist.tpl ⇒ Displays the template for the Watchlist
  • t_watchlist_grid.tpl ⇒ Displays the template for the Watchlist as a grid
  • t_myads_grid.tpl ⇒ Displays a grid of my ads
  • t_search.tpl ⇒ Template for the search page
  • t_creditoffers.tpl ⇒ Display the credit offers
  • t_friend.tpl ⇒ Display friends list
  • t_packageoffers.tpl ⇒ Display the packages offers
  • t_googlemap.tpl ⇒ Display ads via google map
  • t_googlemap_tool.tpl ⇒ Google Map coordinates selection page
  • t_javascriptlanguage.tpl ⇒ Language constants used in Javascript
  • t_listads_header.tpl ⇒ Diplays ads headers
  • t_listads_grid.tpl ⇒ Displays ads list as a grid
  • t_offer.tpl ⇒ Displays a specific offer
  • t_offers.tpl ⇒ Displays all available offers

! Some changes are almost always present between versions, use this documentation as a reference.

(!) Documentation based on Swap Factory version 2.0.0