In this article, you can learn how to create links that make your readers jump to a specific block on your page, also known as anchor linking.
💡 Anchor linking can be a great way to make your content more interactive.
In this article
What is Anchor Linking?
With anchor linking, blocks have their own unique URL, which means you can:
- Jump to a specific section in your content by clicking a button, image, or hotspot linked to that block.
- You can also share the URL containing the block name, which will open the Foleon Doc on that specific block.
How to use anchor linking
Anchor linking works for all types of links, including buttons and text links in a text element. Once you are in the general settings of the desired element, select 'Link to' and you will see ‘block’ as a link option:
Once you select that option, the block selection mode will appear. Here you can pick which block you want to link to:
It's also possible to link to a block on a different page by using the Pages button in the top bar. You can then select a page with the block you want to link to.
After selecting a block, a so-called deep link will be created to the chosen block, and a modal will open up. You can change the default block name (block with ID) to a user-friendly name that looks good in the URL and save it.
⚠️ Important: The name must be unique, so it can’t match another block on the same page. Creating blocks with the same block name can cause linking issues in your content.
The name for the block can also be changed later on, within the General settings of the block.
⚠️ Important: When changing the name of the block, previously created links to that block will not work anymore and will need to be recreated/linked.
How to share links to a specific block
If you want to link your readers to a specific page in Foleon, let's say from an email, you can do this by adapting the live Foleon Doc URL.
After clicking the linked element, you will be brought to the specific block. From there, you can copy the URL containing the block name.
If you add /#block-name to the end of the URL for that page, it will open to that specific block. For example, https://foleonexample.foleon.com/acme/whitepaper-marketing/vision-on-the-market/whitepaper-block.
Please note that this will only work on the published version of your Foleon Doc.