When I use “NAV1.TITLE” it shows 9 times first title “Služby”.
Community guidelines
Please keep discussions civil and on-topic. Repeated violations may lead to a temporary ban.
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 |
|---|---|---|---|---|
| 4 | 195 | 2 months ago | ||
| 3 | 91 | 2 months ago | ||
| 11 | 451 | 3 months ago | ||
| 0 | 45 | 3 months ago | ||
| 5 | 125 | 3 months ago |