Service
The service
object has the following attributes:
service.properties
Returns an array of properties. Each property has name
and value
.
Input
<ul>
{% for property in service.properties %}
<li>
<span>{{ property.name }}</span>
<span>{{ property.value }}</span>
</li>
{% endfor %}
</ul>
Output
<ul>
<li>
<span>Rooftop</span>
<span>94.28 sqm</span>
</li>
</ul>
service.photos
Returns an array of the service’s photos. Use the attachment_url filter to link to the image on Yoolk’s Content Delivery Network. [Optional]
Input
{% for photo in service.photos %}
{{ photo | attachment_url: 'medium' | image_tag }}
{% endfor %}
Output
<img src="http://s-yoolk-images1.yoolk.com/kh/service_images/medium/1367097277/1250047?1367097277" />
Parameters: image sizes
styles | size |
---|---|
thumbnail | 50 x 50 |
small | 196 x auto |
medium | 364 x auto |
large | 994 x auto |
service.cover_photo
Returns the first photo of a service.
Input
{{ service.cover_photo | attachment_url: 'medium' | image_tag }}
Output
<img src="http://s-yoolk-images0.yoolk.com/kh/service_catalog/service_images/medium/1406022689/1145?1406022689" />
service.url
Returns the url of a service.
Input
<a href="{{ service.url }}">{{ service.name }}</a>
Output
<a href="/services/kh12806-office-rental-services/2-ground-floor">2 Ground Floor</a>