Update main layout template to hide link for non existing alternative pages
This commit is contained in:
parent
9a5d8cc0ff
commit
6dff02e318
1 changed files with 5 additions and 1 deletions
|
|
@ -84,16 +84,20 @@ ga('send', 'pageview');
|
||||||
</div>
|
</div>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
{# This method is provided by a custom plugin found in /packages/lektor_pybee_plugin/ #}
|
||||||
|
{% if is_alt_content_available('hello') %}
|
||||||
|
{% endif %}
|
||||||
|
{% if is_alt_content_available(this) %}
|
||||||
<ul class="nav navbar-nav navbar-right">
|
<ul class="nav navbar-nav navbar-right">
|
||||||
{% set extra_slash = '/' if this.path[-1] != '/' else '' %}
|
{% set extra_slash = '/' if this.path[-1] != '/' else '' %}
|
||||||
{% set alt_path = '+' + this.alt if this.alt and this.alt != 'en' else '' %}
|
{% set alt_path = '+' + this.alt if this.alt and this.alt != 'en' else '' %}
|
||||||
{# set trans_available = this.contents != site.get(this.path).contents.as_text() #}
|
|
||||||
<li class="small">
|
<li class="small">
|
||||||
<a href="https://github.com/pybee/pybee.github.io/edit/lektor/content{{ this.path }}{{ extra_slash }}contents{{ alt_path }}.lr">
|
<a href="https://github.com/pybee/pybee.github.io/edit/lektor/content{{ this.path }}{{ extra_slash }}contents{{ alt_path }}.lr">
|
||||||
<i class="fa fa-github "></i><small>{{ t_edit_on_github }}</small>
|
<i class="fa fa-github "></i><small>{{ t_edit_on_github }}</small>
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
</nav>
|
</nav>
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue