Jump to content
View in the app

A better way to browse. Learn more.

Learn more

Is there a way to link to a block?

Featured Replies

Where I have built separate blocks for example a team's schedule, roster, tickets, etc, but they may appear on different page, can I drop an HTML link to a block like in the ol' bookmarks in a page? Tried using block name, and it renders the block. Just want to be able to get the user to it, not permanently display it. If anyone can help, I appreciate it.

  • Author

crickets GIF

Blocks only have keys, they don't own a URL. So you can't link to a block directly.

What you can do is put an anchor target where the block lives. Assuming it's a custom HTML block, add this as the first line of the block's content:

<div id="roster"></div>

Then link to it from anywhere like this:

<a href="/teams/#roster">Team Roster</a>

That works across pages too, so a link on any other page will load the teams page and scroll straight down to the roster section.

If the block is one you can't edit (a feed block for example, or something placed with the page builder), drop a tiny custom HTML block right above it that contains nothing but <span id="roster"></span> and link to that instead. And if you're building the page as manual HTML, you can just wrap the block tag:

<div id="roster">{block="team_roster"}</div>

  • Author

Thank you Cedric, I will give that a try!

Hi @BradTBP

Assuming that you have proper heading titles at the top of the blocks, you could instead target h ID and use this this for the link.

W3docs

How to Add an Anchor Link to Jump to a Specific Part of a...

Learn how to create an anchor link to jump to a specific section of a page, and how to link to the anchor from another webpage. Also see how to style the…
  • Author

I am working on this today, I appreciate your help.

Recently Browsing 0

  • No registered users viewing this page.

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.