macro-get_funnel.jinja · 544 B · ext
.jinja · seen 587× in SWHvia unique-primary
swh:1:cnt:6d6db626553381276941d398c98e2429c352842c;origin=https://github.com/xdvsf/xrpl-dev-portal;anchor=swh:1:rev:d88b0420ca5efe5afcc56ff0510c9679d08b5aec;path=/template/macro-get_funnel.jinja
Show source
{% macro get_funnel(pages, page) -%}
{%- set concepts = pages|selectattr('html', 'defined_and_equalto', 'concepts.html')|first -%}
{%- set tutorials = pages|selectattr('html', 'defined_and_equalto', 'tutorials.html')|first -%}
{%- set references = pages|selectattr('html', 'defined_and_equalto', 'references.html')|first -%}
{%- if concepts.is_ancestor_of(page.html) -%}Concepts
{%- elif tutorials.is_ancestor_of(page.html) -%}Tutorials
{%- elif references.is_ancestor_of(page.html) -%}References
{%- else -%}Other{%- endif -%}
{%- endmacro %}