-1

I have a basic layout for a Drupal 8 site, created two blocks with block 1 containing menu with static content and links to pages, and block 2 for subscription form, The block 1 and block 2 are called on specific pages/nodes. for the menu subscribe in block 1, I gave the anchor link to the block 2 with an id (#subcription), since the block 1 and block 2 are called on specific pages, if the user is on home page and clicks on the subscribe menu it anchors to the home page block 2 which is fine, however when a user is on page 1 or page 2 and clicks on the subscribe menu the block does not anchor to the same page but directed to the homepage block 2 instead, how do we get the block 2 to anchor on the same page the user is in?

Image reference for layout

0

You can anchor to a part of a page by entering just the ID into the menu item Link, without the initial /:

#subscription

This link will always jump within the current page, unless there is no such element in it, then it does nothing.

1
  • this worked..Thankyou!! – Jake13 May 28 at 10:10

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.