{% if related_bible_ref is defined and related_bible_ref is not empty %}
{% set bOnMobile = app.session.get('is_on_mobile') %}
{% set bHas2Columns = (columns is defined and columns|length >= 2) %}
{% set bReadingPlanStep = false %}
{% set sHrefTarget = '' %}
{% if plan_step is defined %}
{% set bReadingPlanStep = true %}
{% set sHrefTarget = ' target=_blank ' %}
{% endif %}
{% set link_spec = related_bible_ref['link_spec'] %}
{% set aColumn1 = ref_column_spec|split('_') %}
{% set link_target = '' %}{% if bOnMobile or bReadingPlanStep %}
{% set link_target = path('bible_chapter', {'translationUrl': related_bible_ref['trans_url'], 'bookUrl': related_bible_ref['book_url'], 'chapterIndex': related_bible_ref['chapter_order']}) %}{% elseif bHas2Columns %}{#
#}{% set link_target = path('arbitrary_three_column', multicolumn_route_params|merge({('column3Details'): link_spec}) ) %}{#
#}{% elseif compare_to is defined and compare_to is not null and (aColumn1|length == 3)%}{#
#}{% set sTransUrl = compare_to.getUrl() %}{#
#}{% set ref_column_spec2 = aColumn1[0] ~ '_' ~ sTransUrl ~ '_' ~ aColumn1[2] %}{#
#}{% set link_target = path('arbitrary_three_column', {'column1Details': ref_column_spec, 'column2Details': ref_column_spec2, 'column3Details': link_spec}) %}{#
#}{% elseif route_story is defined and route_story is not null and route_story.getLevelId() == 1 and ref_column_spec != '' %}{#
#}{% set link_target = path('arbitrary_three_column', {'column1Details': 'biblestory_'~route_story.url~'_'~story_translation_url, 'column2Details': ref_column_spec, 'column3Details': link_spec}) %}{#
#}{% else %}{#
#}{% set link_target = path('arbitrary_two_column', {'column1Details': ref_column_spec, 'column2Details':link_spec}) %}{#
#}{% endif %}
<li class="nav-item"><a href="{{ link_target }}" {{ sHrefTarget }} alt="{{ app.session.get('ui_str')["generic.relatedbibleref"] }}" title="{{ app.session.get('ui_str')["generic.relatedbibleref"] }}" class="nav-link"><i class="fas fa-book-bible"></i><span class="mobile-only"> {{ app.session.get('ui_str')["generic.relatedbibleref"] }}</span></a></li>
{% endif %}