1
0
mirror of https://github.com/e107inc/e107.git synced 2025-08-01 20:30:39 +02:00

{LINK_TARGET} added for use by scrollspy.

This commit is contained in:
Cameron
2017-01-20 13:43:20 -08:00
parent a490d890ee
commit 62a726e274

View File

@@ -1781,6 +1781,26 @@ class navigation_shortcodes extends e_shortcode
return $url;
}
/**
* Returns only the anchor target in the URL if one is found.
* @param null $parm
* @return null|string
*/
function sc_link_target($parm=null)
{
if(strpos($this->var['link_url'],'#')!==false)
{
list($tmp,$segment) = explode('#',$this->var['link_url'],2);
return '#'.$segment;
}
return '#';
}
function sc_link_open($parm = '')
{