Fix 404s for virtual pages

This commit is contained in:
mDuo13
2021-04-29 16:25:13 -07:00
parent 8b1d9ca533
commit 6bc04c320c

View File

@@ -11,12 +11,11 @@
<div class="nav-item {% if currentpage == pg %}active{% elif active_parent%}active-parent{% endif %}">
{% if not pg.children %}
<a class="nav-link nav-leaf" href="{{currentpage.prefix}}{{pg.html}}">{{ pg.name }}{% if pg.status is defined %} {% include 'template-status_'+pg.status+'.html' %}{% endif %}</a>
<a class="nav-link nav-leaf" href="{% if "//" not in pg.html %}{{currentpage.prefix}}{% endif %}{{pg.html}}">{{ pg.name }}{% if pg.status is defined %} {% include 'template-status_'+pg.status+'.html' %}{% endif %}</a>
{% else %}
<a class="nav-toggler {% if not active_parent and currentpage != pg %}collapsed{% endif %}" role="button" data-toggle="collapse" href="#tree_nav_group_{{n}}" aria-expanded="{% if active_parent or currentpage == pg %}true{% else %}false{% endif %}" aria-controls="tree_nav_group_{{n}}"></a>
<a class="nav-link" href="{{currentpage.prefix}}{{pg.html}}">{{ pg.name }}{% if pg.status is defined %} {% include 'template-status_'+pg.status+'.html' %}{% endif %}</a>
<a class="nav-link" href="{% if "//" not in pg.html %}{{currentpage.prefix}}{% endif %}{{pg.html}}">{{ pg.name }}{% if pg.status is defined %} {% include 'template-status_'~pg.status~'.html' %}{% endif %}</a>
<nav class="nav flex-column {% if active_parent or pg == currentpage %}show {% else %}collapse{% endif %}" id="tree_nav_group_{{n}}">
{% for child in pg.children %}
@@ -30,7 +29,7 @@
<nav class="nav flex-column dactyl-tree-nav">
<div class="nav-item nav-parent">
<a class="nav-link" href="{{currentpage.prefix}}{{tree_top.html}}">{{tree_top.name}}</a>
<a class="nav-link" href="{% if "//" not in tree_top.html %}{{currentpage.prefix}}{% endif %}{{tree_top.html}}">{{tree_top.name}}{% if tree_top.status is defined %} {% include 'template-status_'+tree_top.status+'.html' %}{% endif %}</a>
</div>
{% for child in tree_top.children %}
{{ page_w_children(child, loop.index) }}