Link to Element on different page - URL

cms_element

On this page, I linked a button element to an element on the home page. Screenshot:

It didn’t work in preview mode when I inserted the URL like Martin explained here:

Link to an Element on another page?

I am not sure what Martin meant with the URL. There are three options:

  1. https://cms.sitehub.io/1014044/#elementnumber
  2. https://42ca4a-f791c.preview.sitehub.io/#elementnumber
  3. https://av-authority.webhive.co.za/#elementnumber

:bulb:Note: Using URL format number 3, the effect cannot be tested/previewed, unless the site is published, probably because the URL doesn’t exist yet.

So, my question:
In development, before publishing, which one of the other two URL formats should be used, and which one will be converted in the correct URL after publishing? Number 1 or 2? Or should number 3 be used like I did?

Thank you

1 Like

Using the format below, omitting the domain part, should dynamically pick up the base URL in both in preview or published modes:

/#elementnumber

1 Like

A-ha!
Thank you, Sina - it works perfectly :pray:

1 Like