We heard some feedback from web content editors that requrested anchor links to be added as a feature in Wagtail. If you previously used anchor links in WordPress, you may need to go back and edit those in the new website system using our new Anchor Links block.
Anchor links are useful to add if you want to allow users to jump to another section on a longer web page. Our anchor links block will allow you to insert a link to any other heading on your page.
- Make sure there is a heading with a heading level applied above the section you would like to link to. This can be with a heading block (above an image block or other content block) or a heading within a rich text block.
- Insert an anchor link block at the top of the page or wherever you'd like your link to be.
- Adding a heading like "Page Contents" or "Table of Contents" above your anchor link or links is helpful to make it clear to users that those links will keep you on the same page, but jump to another section.
- Choose the heading you'd like to link to from the dropdown menu. The link text will match the heading by default, but feel free to edit the text if you'd like.
See an example of Anchor Links below, and reach out to
eithelpdesk@ncsu.edu if you need assistance!
Heading 1
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nunc pharetra, urna id dignissim feugiat, odio nunc ornare turpis, in convallis ex sem vitae dolor. Pellentesque eleifend ultrices tortor eget pharetra. Nunc luctus odio ut efficitur suscipit. Phasellus porttitor maximus ipsum, at vulputate mi scelerisque eu. Donec et dapibus velit, ac vulputate lectus. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Nam varius, dolor cursus vulputate pharetra, nisl mauris vulputate dolor, a mattis velit orci eget diam.
Heading 2
Suspendisse fringilla tortor eleifend nibh interdum, et vehicula sem luctus. Duis sagittis feugiat odio eget sagittis. Nunc vitae elementum dolor. Proin vel libero in orci gravida posuere. Proin sit amet nunc at elit lacinia pharetra et quis diam. Integer commodo lorem eros, eu porttitor nisi luctus quis. Morbi sollicitudin laoreet vehicula. Sed facilisis consectetur interdum. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. In sagittis orci odio, at dapibus neque mollis sed. Donec eget tempus ex. Fusce quis tempus massa. Donec convallis egestas convallis. Nulla molestie massa vitae est tempus imperdiet a sed mauris. Vivamus nec gravida enim. Nulla hendrerit, nisl et ultricies facilisis, justo eros hendrerit justo, congue faucibus lacus nibh et mi.
Suspendisse leo purus, fringilla ut mauris non, laoreet iaculis nibh. Donec facilisis metus nulla, nec hendrerit turpis vehicula nec. Integer dictum est quis mauris maximus, sit amet aliquam ante ultrices. Nunc nec ligula mollis ligula tristique dignissim ultricies id justo. Vestibulum velit lectus, pharetra at leo sit amet, lacinia placerat dui. Integer a eleifend elit, vel sodales lacus. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia curae;