-
Notifications
You must be signed in to change notification settings - Fork 21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closes #3821: Make the # link stays at the current page #3933
base: main
Are you sure you want to change the base?
Closes #3821: Make the # link stays at the current page #3933
Conversation
Additional change - Use === operator to not convert type that may cause unintended results
…ad-of-the-same-page
…mepage-instead-of-the-same-page' into 3821-the-link-now-goes-to-the-homepage-instead-of-the-same-page
modules/custom/az_card/src/Plugin/Field/FieldFormatter/AZCardDefaultFormatter.php
Outdated
Show resolved
Hide resolved
This works! 👍 From a quick test in Probo, entering <a href="/brian-test-page#heading" class="btn-block">Card link to heading</a> As an alternative, we could consider skipping the addition of the path and we could just use the anchor exactly as entered by the user. In that case, we could set <a href="#heading" class="btn-block">Card link to heading</a> |
…efaultFormatter.php Co-authored-by: Brian Berndt <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good improvement that works. Could look into the suggested alternative. I also see that the Link field formatter works fine with these kinds of links. Could investigate how the field formatter works (e.g., the 'Where' field on Event type works properly).
Description
Fix: Make the # link stays at the current page
Related issues
Closes #3821
How to test
Types of changes
Arizona Quickstart (install profile, custom modules, custom theme)
Drupal core
Drupal contrib projects
Checklist