When I use “NAV1.TITLE” it shows 9 times first title “Služby”.
Themes & Styling
Solved by Gez View solution
you still use loop via twig probably, lets try not using twig to generate links, simply use html a tag like
TWIG
<li><a class="page-scroll" href="{{ 'NAV1.URL'|t }}">{{ 'NAV1.TITLE'|t }}</a></li>
<li><a class="page-scroll" href="{{ 'NAV2.URL'|t }}">{{ 'NAV2.TITLE'|t }}</a></li>
<li><a class="page-scroll" href="{{ 'NAV3.URL'|t }}">{{ 'NAV3.TITLE'|t }}</a></li>
instate of
TWIG
{% for link in site.links %}
{% if link.url | contains('http') %}
{% set domain = '' %}
{% elseif link.url | contains('#') %}
{% set domain = '' %}
{% else %}
{% set domain = base_url_absolute %}
{% endif %}
<li><a class="page-scroll" href="{{ domain }}{{ 'NAV.URL'|t }}" {% if link.url | contains('http') %}target="_blank"{% endif %}>{{ 'NAV.TITLE'|t }}</a></li>
{% endfor %}
later we can shorten code by using loop
while at it, i dont understand the reason we use "home#sluzby" instate of "#sluzby"
last edited 10/09/25 by Gez
Thank you Gin, it finally works!
Log in to reply.
Suggested topics
| Topic | Participants | Replies | Views | Activity |
|---|---|---|---|---|
| 3 | 251 | 2 weeks ago | ||
| 5 | 317 | 2 weeks ago | ||
| 1 | 310 | 4 weeks ago | ||
| 1 | 348 | 1 month ago | ||
| 4 | 474 | 2 months ago |