blob: 2aba3b1f8869e9cd9c73dc7a6eebcb959987a8e4 (
plain)
1
2
3
4
5
6
7
8
9
|
{%- component showdata(page, config, src, type="", key="") -%}
{%- if src and key and type -%}
{%- if src is matching(pat="^http[s]?://") -%}{%- set data = load_data(url=src, format=type) -%}{%- else -%}{%- set data = load_data(path=src, format=type) -%}{%- endif -%}
{{- data[key] }}
{%- else -%}
{%- if src is matching(pat="^http[s]?://") -%}{%- set data = load_data(url=src) -%}{%- else -%}{%- set data = load_data(path=src) -%}{%- endif -%}
{{- data }}
{%- endif -%}
{%- endcomponent showdata -%}
|