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:
Flavio Copes 2016-02-04 18:13:28 +01:00
parent 0913918e26
commit e29cd46960
5 changed files with 5 additions and 4 deletions

View File

@ -51,7 +51,7 @@
{% endmacro %}
{% if config.themes.deliver.dropdown.enabled %}
{% if theme_config.dropdown.enabled %}
{{ _self.loop(pages) }}
{% else %}
{% for page in pages.children %}

View File

@ -2,7 +2,7 @@
<div class="g-grid pure-g-r">
<div id="listing" class="g-block pure-u-2-3">
{% 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) }}
{% endif %}
</div>

View File

@ -46,7 +46,7 @@
{% endif %}
{% endfor %}
{% endmacro %}
{% if config.themes.deliver.dropdown.enabled %}
{% if theme_config.dropdown.enabled %}
{{ _self.loop(pages) }}
{% else %}
{% for page in pages.children %}

View File

@ -1,3 +1,4 @@
{% set theme_config = attribute(config.themes, config.system.pages.theme) %}
<!DOCTYPE html>
<html lang="en">
<head>

View File

@ -18,7 +18,7 @@
{% endmacro %}
<ul class="navigation">
{% if config.themes.deliver.dropdown.enabled %}
{% if theme_config.dropdown.enabled %}
{{ _self.loop(pages) }}
{% else %}
{% for page in pages.children %}