Yoolk Liquid

Home Objects Listing

Listing

The listing object has the following attributes:

The listing object has the following associations:

listing.address

Returns the address of a listing.

listing.alias_id

Returns the alias_id of a listing.

listing.description

Returns the description of a listing.

listing.headline

Returns the headline of a listing.

listing.id

Returns the id of a listing.

listing.is_active

Returns true if it is currently active listing.

listing.lat

Returns latitude of a listing.

listing.long

Returns longitude of a listing.

listing.name

Returns name of a listing.

listing.postal_code

Returns postal_code of a listing.

listing.zoom_level

Returns zoom_level of a listing.

listing.show_map_on_web

Returns true if it shows the map.

listing.facebook_page_url

Returns facebook page url of a listing. [Optional]

listing.twitter_url

Returns twitter url of a listing. [Optional]

listing.created_at

Returns the timestamp of when the listing was created. Use the date filter to format the timestamp.

listing.updated_at

Returns the timestamp of when the listing was last updated. Use the date filter to format the timestamp.

listing.location

Returns location object of a listing. [Mandatory]

listing.country

Returns country object of a listing. [Mandatory]

listing.business_type

Returns business_type object of a listing. [Mandatory]

listing.telephone

Returns communication object which is a telephone of a listing. [Optional]

listing.email

Returns communication object which is an email of a listing. [Optional]

listing.website

Returns communication object which is a website of a listing. [Optional]

listing.communications

Returns an array of communication objects of a listing. A listing has many communication objects. [Optional]

listing.extra_communications

Returns an array of extra_communication objects of a listing. A listing has many extra_communication objects. [Optional]

listing.listing_categories

Returns an array of listing_category objects of a listing. A listing has many listing_category objects. [Optional]

listing.short_descriptions

Returns an array of short_description objects of a listing. A listing has many short_description objects. [Optional]

listing.catalog_items

Returns an array of catalog_item objects of a listing. A listing has many catalog_item objects. [Optional]

listing.galleries

Returns an array of gallery objects of a listing. A listing has many gallery objects. A gallery has many images objects. [Optional]

listing.images

Returns an array of image objects of a listing. A listing has many images objects. [Optional]

listing.brochures

Returns an array of brochure objects of a listing. A listing has many brochure objects. [Optional]

listing.announcements

Returns an array of announcement objects of a listing. A listing has many announcement objects. [Optional]

listing.service_categories

Returns an array of service_category objects of a listing. A listing has many service_category objects. A service_category has many service objects. [Optional]

listing.services

Returns an array of service objects of a listing. A listing has many service objects. [Optional]

listing.product_categories

Returns an array of product_category objects of a listing. A listing has many product_category objects. A product_category has many product objects. [Optional]

listing.products

Returns an array of product objects of a listing. A listing has many product objects. [Optional]

listing.food_categories

Returns an array of food_category objects of a listing. A listing has many food_category objects. A food_category has many food objects. [Optional]

listing.foods

Returns an array of foods objects of a listing. A listing has many food objects. [Optional]

Returns logo object of a listing. A listing has one logo object. [Optional]

listing.people

Returns an array of people objects of a listing. A listing has many people objects. [Optional]

listing.medias

Returns an array of medias objects of a listing. A listing has many medias objects. [Optional]

listing.business_photos

Returns an array of business_photos objects of a listing. A listing has many business_photos objects. [Optional]

listing.keyphrases

Returns an array of keyphrases objects of a listing. A listing has many keyphrases objects. [Optional]

listing.alias_names

Returns an array of alias_names object of a listing. A listing has many alias_names object. [Optional]

listing.business_hours

Returns an array of business_hour object of a listing. A listing has many business_hours object. [Optional]

Input

<table>
  <tr>
    {% for day_name in i18n.day_names %}
      {% assign current = 'now' | date: '%A' %}
      {% if current == day_name %}
        <td class="active">{{ day_name }}</td>
      {% else %}
        <td>{{ day_name }}</td>
      {% endif %}
    {% endfor %}
  </tr>
  <tr>
    {% assign business_hours = listing.business_hours | group_by: 'day_name' %}
    {% for group_by in business_hours %}
      <td>
        {% for business_hour in group_by[1] %}
          {% if business_hour.closed? %}
            Closed
          {% elsif business_hour.full_day? %}
            24h
          {% else %}
            {{ business_hour | open_closed: '%I:%M %p-%I:%M %p' }}<br>
          {% endif %}
        {% endfor %}
      </td>
    {% endfor %}
  </tr>
</table>

Output

<table>
  <tbody>
    <tr>
      <td>Sunday</td>
      <td>Monday</td>
      <td>Tuesday</td>
      <td>Wednesday</td>
      <td class="active">Thursday</td>
      <td>Friday</td>
      <td>Saturday</td>
    </tr>
    <tr>
      <td>
        Closed
      </td>
      <td>
        08:00 AM-12:00 PM<br>02:00 PM-05:00 PM
      </td>
      <td>
        08:00 AM-12:00 PM<br>02:00 PM-05:00 PM
      </td>
      <td>
        08:00 AM-12:00 PM<br>02:00 PM-05:00 PM
      </td>
      <td>
        08:00 AM-12:00 PM<br>02:00 PM-05:00 PM
      </td>
      <td>
        08:00 AM-12:00 PM<br>02:00 PM-05:00 PM
      </td>
      <td>
        Closed
      </td>
    </tr>
  </tbody>
</table>

listing.summary_business_hours

Returns an array of summary business_hour object of a listing. Basically, it’s grouped by business_hour.open and business_hour.closed, and it excludes the closed business_hour. [Optional]

Input

<ul>
    {% for business_hour in listing.summary_business_hours %}
      <li>
        <span>{{ business_hour.abbr_day_name }}</span>
        <span>{{ business_hour | open_closed: '%I:%M %p-%I:%M %p' }}</span>
      </li>
    {% endfor %}
  </ul>

Output

<ul>
  <li>
    <span>Mon-Fri</span>
    <span>08:00 AM-12:00 PM</span>
  </li>
  <li>
    <span>Mon-Fri</span>
    <span>02:00 PM-05:00 PM</span>
  </li>
</ul>

Returns menu_pdf object of a listing. A listing has one menu_pdf object. [Optional]

listing.service_catalog_pdf

Returns service_catalog_pdf object of a listing. A listing has one service_catalog_pdf object. [Optional]

listing.product_catalog_pdf

Returns product_catalog_pdf object of a listing. A listing has one product_catalog_pdf object. [Optional]

listing.portal

Returns portal object of a listing. A listing is normally embedded in portal object. [Mandatory]

listing.instant_website

Returns instant_website object of a listing. A listing has one instant_website object. [Optional]

listing.facebook_page

Returns facebook_page object of a listing. A listing has one facebook_page object. [Optional]

listing.twitter_account

Returns twitter_account object of a listing. A listing has one twitter_account object. [Optional]

listing.multilinguals

Returns an array of listings object which are in other portals and its data is in other languages. [Optional]

Input

<ul>
  {% for multilingual in listing.multilinguals %}
    <li>
      {{ multilingual.language.name }}
    </li>
  {% endfor %}
</ul>

Output

<ul>
  <li>Khmer</li>
  <li>English</li>
</ul>

Returns links object of a listing. A listing has many links object. [Optional]

listing.attachments

Returns attachments object of a listing. A listing has many attachments object. [Optional]