[Typo3-dev] HMENU: don't open mailto-links in new pages
Martin Kutschker
martin.kutschker at no5pam.blackbox.net
Wed Jun 29 16:20:43 CEST 2005
Hi!
I think it's a bug, some might think it's a feature, but this code here
doesn't use a redirect page for mailto links in page type "external url"
Perhaps the changed behaviour can be triggered by a new HMENU-option.
class tslib_menu {
...
link($key,$altTarget='',$typeOverride='') {
...
// Manipulation in case of access restricted pages:
$this->changeLinksForAccessRestrictedPages($LD,$this->menuArr[$key],$mainTarget,$typeOverride);
// NEW CODE START
// If we have a mailto-link set href directly
if ($this->menuArr[$key]['url'] &&
strpos($this->menuArr[$key]['url'],'@')) {
$LD['totalURL'] = 'mailto:'.$this->menuArr[$key]['url'];
}
// NEW CODE END
// Overriding URL / Target if set to do so:
if ($this->menuArr[$key]['_OVERRIDE_HREF']) {
$LD['totalURL'] = $this->menuArr[$key]['_OVERRIDE_HREF'];
if ($this->menuArr[$key]['_OVERRIDE_TARGET']) $LD['target'] =
$this->menuArr[$key]['_OVERRIDE_TARGET'];
}
...
}
Masi
More information about the TYPO3-dev
mailing list