07-26-2023, 11:51 PM
I'd like to output this
<a href='#namedanchor'>link</a>
using the l() function, so that the link just jumps to an anchor on the current page.
I expected this to work
l('link', '', array('fragment' => 'namedanchor'));
but it creates an absolute link to `www.example.com/#namedanchor` instead of `www.example.com/currentpage#namedanchor`
<a href='#namedanchor'>link</a>
using the l() function, so that the link just jumps to an anchor on the current page.
I expected this to work
l('link', '', array('fragment' => 'namedanchor'));
but it creates an absolute link to `www.example.com/#namedanchor` instead of `www.example.com/currentpage#namedanchor`