In-page Anchors

Hi! It's been quite some time since the last post here.
I understand this is still a pending feature on the roadmap. I have one more use case here I want to share to take into consideration when working on it.

I am working on the Single Page landing site. So in multiple places, I have Call To Action buttons that usually link to another section on the same page. But sometimes it can link to the external pages or do some other action.
Because I can't be sure how the CTA button will be used by page editors, currently I need to both add a Link field and Key Text field (as mentioned here) to allow for both internal (scroll anchors) and external links. Of course, it's less than ideal, as stated in this thread already.

  • I can't only use a Link field, because of the problem with local development
  • I could use only the Key Text field and just let users post the external links as a text there, but I would lose some nice functionalities of the Prismic links
  • I don't think I can use Content Relationship Fields, as my understanding is, that they only can connect to the different documents, which I don't have in my single-page landing

I'm sure the dev team has a broader perspective on how it should be developed. My quick ideas on how this feature could work from the user perspective:

  • Add 1 more option to the Link field to specify any text value. So the user can just type "#some-section" and it could be used as
  • Add an Anchor field or Reference field, that can be used in the content building process and appended to the page. And let the Content Relationship Fields see those anchors as a valid relationships that could be linked to.

Anyways, I'm sure I am missing a ton of complexity that comes with this issue, so I hope at least part of this message will be helpful for the product and dev team :slight_smile: Can't wait for this ticket to be rolled out!
Thanks :raised_hands:

2 Likes