--- layout: feature --- {%- assign fileData = site.data[page.folderName][page.lang][page.fileName] -%} {%- assign photoEffectsData = site.data.photoeffects -%}
{%- if site.photoeffectsemd -%}
{%- assign frameh1 = fileData.H1 | replace: "$variable", page.value -%}

{%- for word in frameh1-%} {%- if forloop.first == true -%} {{word | capitalize }} {%- else -%} {{word}} {%- endif -%} {%- endfor -%}

{%- assign frameh2 = fileData.H2 | replace: "$variable", page.value -%}

{%- for word in frameh2 -%} {%- if forloop.first == true -%} {{word | capitalize }} {%- else -%} {{word}} {%- endif -%} {%- endfor -%}

{%- if page.typeOfPage == "category" -%} {%- assign photoEffectsData = site.data.photo-categories -%} {%- for item in photoEffectsData -%} {%- if item.category == page.category -%} {%- for i in item.features -%} {%- endfor -%} {%- endif -%} {%- endfor -%} {%- else -%} {%- assign photoEffectsData = site.data.photoeffects -%} {%- for item in photoEffectsData -%} {%- endfor -%} {%- endif -%}
{%- else -%}
{%- assign frameh1 = fileData.H1 | replace: "$variable", page.value -%}

{%- for word in frameh1-%} {%- if forloop.first == true -%} {{word | capitalize }} {%- else -%} {{word}} {%- endif -%} {%- endfor -%}

{%- assign frameh2 = fileData.H2 | replace: "$variable", page.value -%}

{%- for word in frameh2 -%} {%- if forloop.first == true -%} {{word | capitalize }} {%- else -%} {{word}} {%- endif -%} {%- endfor -%}

{%- if page.typeOfPage == "category" -%} {%- assign photoEffectsData = site.data.photo-categories -%} {%- for item in photoEffectsData -%} {%- if item.category == page.category -%} {%- for i in item.features -%} {%- endfor -%} {%- endif -%} {%- endfor -%} {%- else -%} {%- assign photoEffectsData = site.data.photoeffects -%} {%- for item in photoEffectsData -%} {%- endfor -%} {%- endif -%}
{%- endif -%}