{# This is the main entry template that is called each time in the loop of main page entry results. Variables are passed in for the `lexicon_entry`, and morphological `analyses`. Some of the work here is sent out to `definition.template`. If you need to override this template, keep in mind that there is a somewhat specific structure as relates to Twitter Bootstrap, however the freedom that is available is that everything must be within:
#} {% block template_doc %}{% if TEMPLATE_DOC %} Customizations made here: - include audio_links template after definition - include entry source - include reference links to related lexemes via `lg/lemma_ref` {% endif %}{% endblock %} {%- import "lexicon.macros" as macros with context -%} {%- macro reference_link(has_reference) -%} {{- rendered_templates.entry_text -}} → {{ has_reference }} {%- endmacro -%}
{% if lexicon_entry|count > 0 %} {% set has_reference = lexicon_entry.xpath('./lg/lemma_ref/text()')|first %}

{%- if has_reference -%} {{ reference_link(has_reference) }} {%- else -%} {{- rendered_templates.entry_text -}} {% endif %}

    {{- rendered_templates.definition -}}
{{- rendered_templates.audio_links -}} {% set entry_source = lexicon_entry|xpath('@src')|first %} {% if entry_source %}{{ entry_source }}{% endif %} {% else %} {% endif %}
{{- rendered_templates.analyses -}}
{# vim: set ts=4 sw=4 tw=72 syntax=jinja : #}