Hello Guys,
I did try to solve two issues in the Agency theme without success. My GRAV and TWIG knowledge is by far not sufficient. Maybe somebody can help me in this.
1) When selecting a menu item (anchor) I would like to see the browser address updated to the actual address.
E.g. at url http://localhost/grav-agency/ selecting the 'TEAM' menu item --> http://localhost/grav-agency/#team
The Nav-Menu is perfectly updating, even when scrolling the page, but the browser address is not. How can this be achieved?
2) I was trying to position the Nav-Menu to the left, close to the logo, and some social buttons in line with the Nav-Menu to the right. Which is very similar to the Woo theme navigation.
I did place a 'social.html.twig' file with following content in '/templates/partials':
<ul class="nav-social">
{% for item in site.social %}
<li><a href="{{ item.url }}"><i class="fa fa-{{ item.icon }}"></i></a></li>
{% endfor %}
</ul>
In the 'base.html.twig' file I did add following lines in the {% block header_navigation %} to add the 'social.html.twig' template file:
{% if site.social %}
{% include 'partials/social.html.twig' %}
{% endif %}
The whole block reads as:
{% block header_navigation %}
{% include 'partials/navigation.html.twig' %}
{% if site.social %}
{% include 'partials/social.html.twig' %}
{% endif %}
{% endblock %}
It seems that the code doesn´t render as expected. What needs to be done to get it working?
Another topic I don´t really understand is how and where the variables like 'site.social' and 'item.icon' are defined and used. I know that the social buttons itself are defined in the 'site.yaml' file. I would be happy to get a hint or a link to a detailed tutorial about these topics.