Timeline for Empty link creation
Current License: CC BY-SA 4.0
7 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Aug 12, 2021 at 7:19 | comment | added | Pratip Ghosh |
A possible way out might be like this - $nolink_url = Url::fromUserInput('#', ['fragment' => '#', 'attributes' => ['onclick' => 'return false']]); Though this would not put a javascript: void(0) in place, but will stop the jump to the top which was my actual requirement. :)
|
|
Aug 31, 2018 at 7:16 | comment | added | Menno van den Heuvel | Because of what you tried I thought it might be. Either way, I expect the answer will be the same: use an inline or twig template to do this. The Url class - from a cursory glance at the source - I don't think will generate a javascript url. | |
Aug 31, 2018 at 3:38 | comment | added | Pratip Ghosh |
Might not be. The solution in the link creates a # link. I want a javascript: void(0) linked anchor tag.
|
|
Aug 30, 2018 at 18:55 | review | Close votes | |||
Sep 6, 2018 at 18:32 | |||||
Aug 30, 2018 at 18:38 | comment | added | Menno van den Heuvel | Possible duplicate of Create a link pointing to # | |
Aug 30, 2018 at 11:15 | history | edited | leymannx | CC BY-SA 4.0 |
edited title
|
Aug 30, 2018 at 10:27 | history | asked | Pratip Ghosh | CC BY-SA 4.0 |