Set a globally available `theme_config` var and use it
Fixes issues with dropdown in child themes, as deliver was explicitly referenced when checking the config.
This commit is contained in:
parent
0913918e26
commit
e29cd46960
|
@ -51,7 +51,7 @@
|
||||||
{% endmacro %}
|
{% endmacro %}
|
||||||
|
|
||||||
|
|
||||||
{% if config.themes.deliver.dropdown.enabled %}
|
{% if theme_config.dropdown.enabled %}
|
||||||
{{ _self.loop(pages) }}
|
{{ _self.loop(pages) }}
|
||||||
{% else %}
|
{% else %}
|
||||||
{% for page in pages.children %}
|
{% for page in pages.children %}
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
<div class="g-grid pure-g-r">
|
<div class="g-grid pure-g-r">
|
||||||
<div id="listing" class="g-block pure-u-2-3">
|
<div id="listing" class="g-block pure-u-2-3">
|
||||||
{% if config.plugins.simple_form.enabled %}
|
{% if config.plugins.simple_form.enabled %}
|
||||||
{% set simple_form_config = page.header.simple_form ?: config.themes.deliver.simple_form %}
|
{% set simple_form_config = page.header.simple_form ?: theme_config.simple_form %}
|
||||||
{{ simple_form(simple_form_config) }}
|
{{ simple_form(simple_form_config) }}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -46,7 +46,7 @@
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
{% endmacro %}
|
{% endmacro %}
|
||||||
{% if config.themes.deliver.dropdown.enabled %}
|
{% if theme_config.dropdown.enabled %}
|
||||||
{{ _self.loop(pages) }}
|
{{ _self.loop(pages) }}
|
||||||
{% else %}
|
{% else %}
|
||||||
{% for page in pages.children %}
|
{% for page in pages.children %}
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
{% set theme_config = attribute(config.themes, config.system.pages.theme) %}
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html lang="en">
|
<html lang="en">
|
||||||
<head>
|
<head>
|
||||||
|
|
|
@ -18,7 +18,7 @@
|
||||||
{% endmacro %}
|
{% endmacro %}
|
||||||
|
|
||||||
<ul class="navigation">
|
<ul class="navigation">
|
||||||
{% if config.themes.deliver.dropdown.enabled %}
|
{% if theme_config.dropdown.enabled %}
|
||||||
{{ _self.loop(pages) }}
|
{{ _self.loop(pages) }}
|
||||||
{% else %}
|
{% else %}
|
||||||
{% for page in pages.children %}
|
{% for page in pages.children %}
|
||||||
|
|
Loading…
Reference in New Issue