Forum Discussion

Deleted's avatar
Deleted
Dec 01, 2017

Anchor links in News page

Hi!

 

I have written quite a long News page in a Communication site. Is it possible to have anchor links to headlines or sections of that article?

7 Replies

  • Alpine_Miller's avatar
    Alpine_Miller
    Copper Contributor

    This might be fixed now as of August 2019.

     

    SPO makes any text where you use the "header" style into a potential anchor.

     

    Publish the page and then mouse over the header text. You'll see a little link icon.

    Right click and copy the link. That's your header link INTERNAL TO THE PAGE

     

    If you want to use the link in a menu, you have to modify it. If your anchor link was something like this:

    https://XXX.sharepoint.com/sites/XXX/SitePages/Human-Resources.aspx#benefits

     

    To get to that anchor via a menu item you have to add a '?' before the anchor hash tag thusly:

    https://XXX.sharepoint.com/sites/XXX/SitePages/Human-Resources.aspx?#benefits

     

    HUGE thanks to Doug Allen writing at the C5 Insight page for discovering this little trick...

    https://www.c5insight.com/Resources/Blog/tabid/148/entryid/736/the-incredibly-easy-no-code-solution-to-simple-anchor-tags-in-sharepoint-navigation.aspx

     

    • EmersonOliveira's avatar
      EmersonOliveira
      Copper Contributor

      hello Alpine_Miller 

      I saw many people saying about this resource, but I cannot use this feature because a url (#) is not created from a Header.

       

      My question is:

      Is it necessary to enable the feature in any sharepoint settings?

      • Alpine_Miller's avatar
        Alpine_Miller
        Copper Contributor

        EmersonOliveiraI didn't have to turn on any settings. In my experience, any time you use the text style "Header 1" or "Header 2", it creates an anchor point. You have to publish the page live, then when you mouse over the Header 1/2 text a little anchor link appears to the right of the text. Right click on that and copy the link and you can use that for the URL.

  • Rebecca Gordon's avatar
    Rebecca Gordon
    Copper Contributor

    This isn't possible yet as far as I can tell :(. Hopefully some OOTB controls are created and we don't have to write custom web parts to do this sort of thing. 

     

    Here's a couple of user voices you can go vote for and comment on in relation:

    https://sharepoint.uservoice.com/forums/329214-sites-and-collaboration/suggestions/19356937-add-the-feature-that-could-enable-for-me-to-jump-t

     

    https://sharepoint.uservoice.com/forums/329214-sites-and-collaboration/suggestions/31517626-features-to-edit-modern-pages

    • Deleted's avatar
      Deleted
      Thank you,
      I have voted in the two user voices and hoping that this will be a feature someday 🙂

Resources