mirror of
https://github.com/welpo/tabi.git
synced 2026-05-14 10:07:34 +02:00
🐛 fix(settings): correct setting priority evaluation
This commit is contained in:
parent
4b68b0e9d4
commit
48de3332c8
1 changed files with 4 additions and 4 deletions
|
|
@ -20,15 +20,15 @@ Parameters:
|
|||
{%- endif -%}
|
||||
|
||||
{%- set priority_order = [
|
||||
page.extra[setting] | default(value=default_global_value),
|
||||
current_section.extra[setting] | default(value=default_global_value),
|
||||
config.extra[setting] | default(value=default_global_value)
|
||||
page.extra[setting] | default(value=""),
|
||||
current_section.extra[setting] | default(value=""),
|
||||
config.extra[setting] | default(value="")
|
||||
] -%}
|
||||
|
||||
{%- set output = default_global_value -%}
|
||||
|
||||
{%- for value in priority_order -%}
|
||||
{%- if value != default_global_value -%}
|
||||
{%- if value != "" -%}
|
||||
{%- set_global output = value -%}
|
||||
{%- break -%}
|
||||
{%- endif -%}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue