Featured Items functionality

One of the ways you can promote or feature specific listings is through our Featured Listings functionality. This element allows you to add a simple liquid line to your homepage (or where ever you wish to show the featured listings) and any Listings that you have tagged as Featured will be displayed.

To add Featured Listings to your marketplace, follow the steps below:

Step 1

Add the following liquid tag to the liquid view where you want the the element to appear:

{% featured_items target: transactables, amount: number_of_items_you_want_to_show, type: name_of_transactable %}

Replacing  number_of_items_you_want_to_show with a number, we used 4 for our example

Replacing  name_of_transactable with the name of the transactable on your marketplace, we used Swappables for our example.

Our sample code is: {% featured_items target: transactables, amount: 4, type: Swappables %}


If your Transactable Type has multiple words (example: Pet Services) you will need to put the name_of_transactable in single quotes making your liquid markup look like:

{% featured_items target: transactables, amount: 4, type: 'Pet Services' %}

Step 2

We'll add it to our Homepage Content Liquid View:

Step 3

Now we simply need to enable the 'Featured Item' functionality on the listings we want to showcase in this element. To do this we go to Admin Dash > Reports > Transactables, click 'Edit' on the listing we want to showcase, choose 'Featured' and then save our work. This Listing will now be visible in our Featured Listing element.

Step 4

You can edit the look and feel of the element by creating a liquid view with the path  featured_items/transactables and inserting the following initial content to it:

<div class="item span3">
    <div class="item-image">
        <img src="{{ item.photo_url }}" />
    <span class="item-title">{{ item.name }}</span>
    {% if item.name.size < 200 %}
        <span class="item-description">{{ item.description | truncate:200 }}</span>
    {% endif %}

    <span class="item-price">{{ item.from_money_period }}</span>

    <a href="{{ item.url }}" class="btn btn-blue">
        {{ "featured_items.view_item" | translate: item_type_name: item.transactable_type.name }}