How to create an anchor link in Drupal?

Why?

In order to redirect to visitor an for example a form on the same page as he is.

Before you start

If you work in the country CMS, please refer first to the article "How to add content into the SME and Country Drupal Back-offices?" in order to select your country before starting creating some content.

How?

  1. Create an anchor
  1. Thanks to the drag and drop functionality, place the anchor above the paragraph you want the visitor to land when clicking on the link.
  1. Give a name to the anchor
  1. Copy the machine name
  1. Select the button/link from which you want to link the anchor
    1. Your anchor link is in a button
  • As url: Please fill the current page you work on
  • Link text: Add the text which will appear on the button
  • Target: Same window
  • Fragment: Please paste the machine you have copied previously
  • Click on save
  • Save the page

b Your anchor link is a text link

  • Type the text you want as a text link
  • Select the text and click on link

  • As url: Please fill the external URL of the page you work (for example: https://www.sdworx.ro/ro-ro) and add the anchor with # before. It means in the example above:
    => https://www.sdworx.ro/ro-ro#facts-figures

If you want to create an anchor specific for a pardot form, please refer to the following user manual: How to set an anchor in an inframe (for a pardot form) in Drupal? - MarTech Academy (helpdocs.io)


How did we do?


MarTech Academy (opens in a new tab)

Powered by HelpDocs (opens in a new tab)