Relations

In HiFi it is typically easiest to just include all relations when you are fetching a post.  You can do this with the relations keyword.  Here is how you would do it:

{% set posts_with_relations as hifi.get({type: 'post', relations: '*'}) %}

This returns all related hifi objects grouped by relation name. Here is how you might use this information from the above query:

{% for post in posts_with_relations %}
    {{ post.title }}
    By:
    {% for author in post.relations.author %}
        {{ author.title }}
    {% endfor %}
    Categorized as:
    {% for category in post.relations.category %}
        {{ category.title }}
    {% endfor %}
{% endfor %}