URL Hashmarks are a feature of Replo that allows visitors to scroll to a specific section of a Replo page.
To create a URL Hashmark:
- In the Replo Editor, select any component in Replo that you want the page to scroll to.
- Select the Container of that component. If the component doesn't have a container, you can insert a container around it by right-clicking the component in the left bar and selecting "Group Into Container".
- Navigate to "Config" in the right bar.
- Find the "URL Hashmark" config, and enter the name you want to appear after the "#" mark in the URL - for example, "shop-now".
To make a button scroll to a URL Hashmark
- Select the component you want to click to scroll to a URL hashmark section.
- In the right bar, find "Interactions" and add an On Click interaction.
- In the interaction popup, select "Scroll to URL Hashmark" from the dropdown. Note that you must create a URL hashmark elsewhere in the page first, or else the "Scroll to URL Hashmark" option won't appear.
- Type in the hashmark you want to scroll to.
- An offset specified in pixels up from the desired hashmarked section can be set via the Offset config.
- The "Smooth Scroll" toggle can be used to choose between an immediate scroll to the hashmarked section, or a smooth animated scroll.
- You can verify that scrolling to the hashmark works by enabling Preview Mode then clicking the button you added the interaction to.
Auto-setting Hashmarks in the URL
By default, when you set a URL hashmark on a container in Replo, the hashmark will automatically get added to the URL when a visitor scrolls to that section. Sometimes, this isn't what you want, so you can use the "Auto-enable URL Hashmark" setting to set whether the hashmark is automatically added to the URL.
To set auto-enabling of URL hashmarks:
- Select the component you defined the URL hashmark on
- In the right bar, find Config, then "Auto-enable URL Hashmark"
- Set the value to on to indicate that the hashmark should be automatically added to the URL when the user scrolls past this container on the Replo page, or off to indicate that the hashmark should not be added to the URL.