{% extends 'NCBSWBundle::layout.html.twig' %}
{% set multicolumn = true %}
{# For title/description, the GeneralController will define a route_story variable if the page is accessed specifically through a /story/ route. It will additionally define a route_bible_translation variable if the route used specifies a particular Bible translation to use. #}
{% block title %}
{% if route_story is defined and route_story is null %}
{{ app.session.get('ui_str')["meta.bible.index.stories.subtitle"] }}
{% elseif route_bible_translation is defined %}
{{ app.session.get('ui_str')["meta.bible.story.explanation.subtitle.specifictranslation"]|replace({'_9000_': route_story.name, '_9100_': route_bible_translation.name})|raw }} {{ app.session.get('ui_str')["meta.userinterface"] }}
{% elseif route_story is defined %} {# (we know route_story is not null in this case, due to previous if condition) #}
{{ app.session.get('ui_str')["meta.bible.story.explanation.subtitle.generic"]|replace({'_9000_': route_story.name})|raw }} {{ app.session.get('ui_str')["meta.userinterface"] }}
{% else %}
{% include 'NCBSWBundle:General:multicolumn/column_titles.html.twig' %}
{% endif %}
{% endblock %}
{% block description %}
{% if route_story is defined and route_story is null %}
{{ app.session.get('ui_str')["meta.bible.index.stories.desc"] }}
{% elseif route_story is defined %}
{{ story_meta_desc|raw }}
{% else %}
{% include 'NCBSWBundle:General:multicolumn/column_descriptions.html.twig' %}
{% endif %}
{% endblock %}
{# TODO: Substitute for certain things that usually appear in the right-hand column (e.g. locale switcher) #}
{% block container %}
<div class="row">
{% for column_num, single_column_data in columns %}
<div id="column{{ column_num }}" class="col-md-{{ 12 / (columns|length) }}">
{% if single_column_data['column_type'] == 'bible' %}
{% include 'NCBSWBundle:Bible:multicolumn/breadcrumbs.html.twig' with single_column_data %}
{% elseif single_column_data['column_type'] == 'exposition' and (single_column_data['work'] is defined or single_column_data['translation'] is defined or single_column_data['passage'] is defined or single_column_data['verse_explanations'] is defined) %}
{% include 'NCBSWBundle:Exposition:multicolumn/breadcrumbs.html.twig' with single_column_data %}
{% else %}
{% include 'NCBSWBundle:General:multicolumn/error_header.html.twig' with single_column_data %}
{% endif %}
{% if single_column_data['column_type'] == 'bible' %}
{% include 'NCBSWBundle:Bible:multicolumn/bible_text_column.html.twig' with single_column_data %}
{% elseif single_column_data['column_type'] == 'exposition' and (single_column_data['work'] is defined or single_column_data['translation'] is defined or single_column_data['passage'] is defined) %}
{% include 'NCBSWBundle:Exposition:multicolumn/exposition_text_column.html.twig' with single_column_data %}
{% else %}
{% endif %}
</div>
{% endfor %}
</div>
{% if app.session.get('current_explanation_cchapter_id') != '' %}
<script>
showElemByID('ExplainChapter');
</script>
{% endif %}
{% endblock %}