{# Here we render only what should appear as the entry text, but try to avoid any additional HTML formatting. NB: you probably need tag filters `text`. #} {% block template_doc %}{% if TEMPLATE_DOC %} Overrides here: - display morphological type, `lg/lc/text()` alongside entry POS {% endif %}{% endblock %} {%- import "lexicon.macros" as macros with context -%} {%- set first_l = lexicon_entry|xpath('lg/l')|first %} {% set lc_text = lexicon_entry|xpath('lg/lc/text()')|first|tagfilter(_from, _to) %} {% set pos_text = first_l|xpath('@pos')|tagfilter(_from, _to) %} {%- if lc_text %} {% set pos_text = "%s, %s" % (pos_text, lc_text) %} {% endif -%} {{ first_l|text }} ({{ pos_text }}) {# vim: set ts=4 sw=4 tw=72 syntax=htmljinja : #}