<commit_before>{% include '_header.twig' %}

{# -----
This is the 'default record' template. Try to do some generic stuff, so we
can output all fields.

Note: You probably don't want to use this template as a base for your own
templates. 'entry.twig' is much more straightforward.

----- #}

<article>

    <h1><a href="{{ record.link }}">{{ record.title }}</a></h1>

    {% if record.subtitle %}
    <h2>{{ record.subtitle }}</h2>
    {% endif %}

    {% for key,value in record.values %}

        {%  if key not in ['id', 'slug', 'datecreated', 'datechanged', 'datepublish', 'datedepublish', 'username', 'status', 'title', 'subtitle'] %}

            {% if record.fieldtype(key) == "image" and value != "" %}

                <div class='imageholder-wide'><img src="{{ value|thumbnail(800, 600) }}"></div>

            {% elseif record.fieldtype(key) == "imagelist" and value != "" %}

                {# We do something tricky here: we need to get value of the list in the proper
                   way, so the value in actually returned as a list. Using {{ record.key }}
                   won't work, because there is no value 'key'. In your own templates you
                   will be able to use {{ record.yourfieldname }}. #}

                {% set list = attribute(record, key) %}

                {% for item in list %}
                    <a href="{{ item.filename|image }}">
                        <img src="{{ item.filename|thumbnail(100,100) }}" alt="{{ item.title }}" title="{{ item.title }}">
                    </a>
                {% endfor %}

            {% elseif record.fieldtype(key) == "video" and value.responsive != "" %}

                {{ value.responsive }}

            {% elseif record.fieldtype(key) == "geolocation" and value.latitude != "" %}

                <div class='imageholder-wide'>
                    <img src="http://maps.googleapis.com/maps/api/staticmap?center={{ value.latitude }},{{ value.longitude }}&zoom=14&size=617x300&sensor=false&markers={{ value.latitude }},{{ value.longitude }}">
                </div>
                <p>{{ value.formatted_address }}</p>

            {% elseif record.fieldtype(key) not in ['templateselect'] and value != "" %}

                <div>
                    {{ attribute(record, key) }}
                </div>

            {%  endif %}


        {% endif %}

    {% endfor %}

    {# print related content, if there is any. #}
    {% set relatedrecords = record.related %}
    {% if relatedrecords is not empty %}
        <p>Related content:</p>
        <ul>
            {% for related in relatedrecords %}
                <li><a href="{{ related.link }}">{{ related.title }}</a></li>
            {%  endfor %}
        </ul>
    {% endif %}


    {% include '_recordfooter.twig' with {record: record} %}

    <p class="meta">
        {% set previous = record.previous() %}
        {% if previous %}
            <a href="{{ previous.link }}">&laquo; {{ previous.title }}</a>
        {% endif %}

        {% set next = record.next() %}
        {% if next %}
            <a href="{{ next.link }}">{{ next.title }} &raquo;</a>
        {% endif %}
    </p>

    {# Just print out the entire record. For reference and stuff #}
    {{ print(record) }}

</article>

{% include '_footer.twig' %}<commit_msg>Don't print the record in the default template, since it exposes the paths.<commit_after>{% include '_header.twig' %}

{# -----
This is the 'default record' template. Try to do some generic stuff, so we
can output all fields.

Note: You probably don't want to use this template as a base for your own
templates. 'entry.twig' is much more straightforward.

----- #}

<article>

    <h1><a href="{{ record.link }}">{{ record.title }}</a></h1>

    {% if record.subtitle %}
    <h2>{{ record.subtitle }}</h2>
    {% endif %}

    {% for key,value in record.values %}

        {%  if key not in ['id', 'slug', 'datecreated', 'datechanged', 'datepublish', 'datedepublish', 'username', 'status', 'title', 'subtitle'] %}

            {% if record.fieldtype(key) == "image" and value != "" %}

                <div class='imageholder-wide'><img src="{{ value|thumbnail(800, 600) }}"></div>

            {% elseif record.fieldtype(key) == "imagelist" and value != "" %}

                {# We do something tricky here: we need to get value of the list in the proper
                   way, so the value in actually returned as a list. Using {{ record.key }}
                   won't work, because there is no value 'key'. In your own templates you
                   will be able to use {{ record.yourfieldname }}. #}

                {% set list = attribute(record, key) %}

                {% for item in list %}
                    <a href="{{ item.filename|image }}">
                        <img src="{{ item.filename|thumbnail(100,100) }}" alt="{{ item.title }}" title="{{ item.title }}">
                    </a>
                {% endfor %}

            {% elseif record.fieldtype(key) == "video" and value.responsive != "" %}

                {{ value.responsive }}

            {% elseif record.fieldtype(key) == "geolocation" and value.latitude != "" %}

                <div class='imageholder-wide'>
                    <img src="http://maps.googleapis.com/maps/api/staticmap?center={{ value.latitude }},{{ value.longitude }}&zoom=14&size=617x300&sensor=false&markers={{ value.latitude }},{{ value.longitude }}">
                </div>
                <p>{{ value.formatted_address }}</p>

            {% elseif record.fieldtype(key) not in ['templateselect'] and value != "" %}

                <div>
                    {{ attribute(record, key) }}
                </div>

            {%  endif %}


        {% endif %}

    {% endfor %}

    {# print related content, if there is any. #}
    {% set relatedrecords = record.related %}
    {% if relatedrecords is not empty %}
        <p>Related content:</p>
        <ul>
            {% for related in relatedrecords %}
                <li><a href="{{ related.link }}">{{ related.title }}</a></li>
            {%  endfor %}
        </ul>
    {% endif %}


    {% include '_recordfooter.twig' with {record: record} %}

    <p class="meta">
        {% set previous = record.previous() %}
        {% if previous %}
            <a href="{{ previous.link }}">&laquo; {{ previous.title }}</a>
        {% endif %}

        {% set next = record.next() %}
        {% if next %}
            <a href="{{ next.link }}">{{ next.title }} &raquo;</a>
        {% endif %}
    </p>

    {# Just print out the entire record. For reference and stuff 
    {{ print(record) }} 
    #}

</article>

{% include '_footer.twig' %}
{'fraction_non_alphanumeric': 0.17152736019242334, 'fraction_numerical': 0.0072158749248346366, 'mean_word_length': 1.9674397859054416, 'pattern_counts': {'":': 0, '<': 73, '<?xml version=': 0, '>': 73, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4707620', 'n_tokens_mistral': 2083, 'n_tokens_neox': 1822, 'n_words': 548}