Custom ID

edited July 2019 in Menu / Mega menu
Hi,

I would like when I click on the button "go to # section" in the menu, that we scroll to the section and not go directly
How can I do it ?

Thanks in advance and sorry for my english

Comments

  • Hello,
    This is what you need to do:

    1. Go to menus and create a new menu - http://prnt.sc/f2v9he
    2. Name the menu and add a custom link with the ID anchor you will use later(do not use spaces). Add to menu -http://prnt.sc/f2v9th
    3. When the menu item is added to the menu, save and go to Manage Locations -http://prnt.sc/f2vafb
    4. You go to your main page, you see the new link but when you click nothing happens? No worries, it is because the link has to know where to scroll, to do this edit the page. -http://prnt.sc/f2vc36
    5. Edit the section to which you want the button to scroll -http://prnt.sc/f2vcho
    6. In the field Custom ID type in the id from the button, in my case, it was id=work, no hashtag there -http://prnt.sc/f2vgaz
    7. Remember to have the one-page option selected under the muffinbuiler -http://prnt.sc/f2vcm7

    If you do not want to use a normal menu to link the user to sections, you need to add a 'scroll' class to the custom link elemment.

    Thanks
  • edited July 2019
    Thanks,
  • All the rules are the same, the only difference is in the URL.
    If you want to redirect to another page, and then scroll to ID, you will need to change links in the menu.
    For example:
    You have an /about page that you want to redirect with a scroll to ID.
    You should use a url like this mywebsite.com/about#contact

    The problem comes, when you click this link on the about page, it will then again reload the page and then redirect. You can always use a separate secondary menu in individual pages to fix this issue.

    thanks
Sign In or Register to comment.