I am trying to add target="_blank" parameter to the <base> Tag in the header, when certain parameters are met.
Currently the base tag is filled with the url give in config.baseUrl:
<base href="http://yourdomain.com/">
I've gone through the reference and tried different settings (meta, pages.headerData, ..) but I was not able to manipulate the <base> tag within the header.
what I want to achieve is this:
<base href="http://yourdomain.com/" target="_blank">
what I got so far is to remove the baseUrl completely and set <base> manually:
page.headerData.1 = TEXT
page.headerData.1.value < config.baseURL
page.headerData.1.wrap = <base href="|" target="_blank">
config.baseURL >
Still i have 2 problems with this: Typo3 (in my case 4.5) adds a CSS link before my tag - which results in a file not found message when I open any sub-path on the website. when opening: http://yourdomain.com/path/subpath
<!DOCTYPE html>
<html class="no-js" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="generator" content="TYPO3 4.5 CMS">
<link rel="stylesheet" type="text/css" href="typo3temp/stylesheet_xxx.css?xxx" media="all">
<base href="http://yourdomain.com/" target="_blank">
<title>Some title</title>
chrome says:
/path/subpath/stylesheet_xxx.css?xxx GET 404
(where it should find the file in /stylesheet_xxx.css?xxx ..)
the other problem is, that when doing a HMENU with special=rootline
logo = HMENU
logo {
special = rootline
special.range = 0|0
}
the href to the startpage will always be blank, after I unset config.baseUrl.
Any help would be greatly appreciated.
/edit: adding a second <base> tag in header would work, but the validator doesn't like two base tags :(
Maybe this constants help you?
From here: http://www.pi-phi.de/25.html