Yoolk Liquid

Home Objects People

Person

The person object has the following attributes:

person.nationality

Returns person nationality.

{{ person.nationality.name }}
# => Cambodia

person.languages

Returns person languages.

Input

{% for language in person.languages %}
  {{ language.name }} ({{ language.two_code }})
{% endfor %}

Output

English (en)
Japan (jp)

person.photos

Returns an array of the person’s photos. Use the attachment_url filter to link to the image on Yoolk’s Content Delivery Network. [Optional]

Input

{% for photo in person.photos %}
  {{ photo | attachment_url: 'medium' | image_tag }}
{% endfor %}

Output

<img src="http://s-yoolk-images1.yoolk.com/kh/person_images/medium/1367097277/1250047?1367097277" />
Parameters: image sizes
styles size
small x161
medium x239

person.position_level

Returns person’s position level.

{{ person.position_level.name }}
# => Director

person.communications

Returns an array of the person’s communications.

Input

{% for com in person.communications %}
  Id: {{ com.id }}
  Type: {{ com.type }}
  Value: {{ com.value }}
  Is first line: {{ com.is_first_line }}
{% endfor %}

Output

Id: 1
Type: Mobile Phone
Value: 099 234 567
Is first line: true

person.male?

Returns true only if person gender is male.

person.female?

Returns true only if person gender is female.

person.full_name

Returns concatenate between first name and last name separate by a single space.