Use dataLayer for page type info

This commit is contained in:
mDuo13
2021-09-14 16:09:42 -07:00
parent 839968bbbb
commit bb7589b35e
24 changed files with 262 additions and 95 deletions

View File

@@ -0,0 +1,9 @@
{% 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 tutorials.is_ancestor_of(page.html) -%}References
{%- else -%}Other{%- endif -%}
{%- endmacro %}