mirror of
https://github.com/inventree/inventree-website.git
synced 2025-06-14 02:55:34 +00:00
make internal stuff relativ
This commit is contained in:
@ -17,7 +17,7 @@
|
||||
<nav class="list-none mb-10">
|
||||
{% for item in cat.cats %}
|
||||
<li>
|
||||
<a href="{% if item.site %}{{ site[item.site] }}{% else %}{{ item.link }}{% endif %}" class="footer-link">{{ item.name }}</a>
|
||||
<a href="{% include link.html item=item%}" class="footer-link">{{ item.name }}</a>
|
||||
</li>
|
||||
{% endfor %}
|
||||
</nav>
|
||||
|
7
_includes/link.html
Normal file
7
_includes/link.html
Normal file
@ -0,0 +1,7 @@
|
||||
{% if include.item.site %}
|
||||
{{ site[include.item.site] }}
|
||||
{% elsif include.item.internal %}
|
||||
{{ include.item.internal | relativurl }}
|
||||
{% else %}
|
||||
{{ include.item.link }}
|
||||
{% endif %}
|
Reference in New Issue
Block a user