mirror of
https://github.com/e107inc/e107.git
synced 2025-08-04 21:57:51 +02:00
{LINK_TARGET} added for use by scrollspy.
This commit is contained in:
@@ -1782,6 +1782,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 = '')
|
||||
{
|
||||
$type = $this->var['link_open'] ? (int) $this->var['link_open'] : 0;
|
||||
|
Reference in New Issue
Block a user