Listings Plugin

The listing plugin (Since v4.2.0) allows you to generate a list of listings on any template file you want.

To call this function you would include the following code in any template file you want it to appear.

{listings number="3" sort_column="dateadded" assign="new_listings"}
<h2>New Listings</h2>
{foreach from=$new_listings item="entry"}
    {$entry.title} - {$entry.price} - {$entry.link}
{/foreach}  

The code above calls the plugin and assigns the results to the $new_listings variable. Next we loop through the results and display it how we want.

Parameters

limit
(integer) The max number of listings you want displayed.
category
(integer) The id of a category. Only listings in this category will be displayed.
sort_order
(string) The sort order. asc, desc, or rand. Default is “desc”
sort_column
(string) The column to sort. Default is “title”
assign
(string) The variable you want it assigned to. Default is “listings”.
owner
(integer) This the user id of the listings you want to show. This will allow you to have more ads by a certain seller.
featured
(string) Y or N Whether the listings should be featured or not. Default is “N”.