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:
@@ -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 = '')
|
||||
{
|
||||
|
Reference in New Issue
Block a user