Agency theme navigation issues

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’:

    {% for item in site.social %}
  • {% endfor %}

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.

  1. is something introduced by the jQuery Easing library included by the theme, you can disable it (remove it from the theme base.html.twig file) or check if it can be configured to preserve the anchor.

  2. site is an array containing all the values defined in the site.yaml file. That’s injected by default and can be used by the Grav themes. That’s where social is coming from. The item variable instead is part of the for loop you defined.

Hi flaviocopes,
thanks a lot for your feedback!

  1. I will try to disable or reconfigure it asap.
  2. OK, I understand that this is an array. But it is not obvious how to address specific items and get it included in the base.html.twig template. My code didn´t work as expected. Any idea?

Hi, I tested it. As you said it is a problem of jQuery Easing. I will replace it as it seems to be easier than fixing the library.

Still struggling on 2) to get the social buttons inline the nav-menu working.

Solved. Just polishing via CSS.