[TYPO3] Head/body rendered twice

Dan Frederiksen dan at natteravnen.dk
Sat Jan 20 12:40:15 CET 2007


Hello experts :o)

I've set up a site according to the Modern Template building (section 1) 
- but my head and body-tag renders twice.

------ CODESNIPPET - HTML OUTPUT START -------

<?xml version="1.0" encoding="iso-8859-1"?>

<!DOCTYPE html
     PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
     "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />

<!-- 
	This website is powered by TYPO3 - inspiring people to share!
	TYPO3 is a free open source Content Management Framework initially created by Kasper Skaarhoj and licensed under GNU/GPL.
	TYPO3 is copyright 1998-2006 of Kasper Skaarhoj. Extensions are copyright of their respective owners.
	Information and contribution at http://typo3.com/ and http://typo3.org/
-->

	<link rel="stylesheet" type="text/css" href="typo3temp/stylesheet_2d44f9cb1f.css" />
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<link href="fileadmin/template/stylesheet.css" rel="stylesheet" type="text/css">
	<title>Dan's super personal website :)</title><meta name="generator" content="TYPO3 4.0 CMS" />
	<script type="text/javascript" src="typo3temp/javascript_757c080409.js"></script>
</head>
<body>
<html>
<head><!--###DOCUMENT_HEADER### begin -->
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<link href="fileadmin/template/stylesheet.css" rel="stylesheet" type="text/css">
<!--###DOCUMENT_HEADER### end --></head>
<body><!--###DOCUMENT_BODY### begin --> 


(etc.)

------ CODESNIPPET - HTML OUTPUT END-------

My typoscript template is of course pretty long, so i've pasted the parts here which i guess is relevant. Please let me know if you want something else? 



------ CODESNIPPET - TYPOSCRIPT TEMPLATE START -------
# Config Autoparser:
plugin.tx_automaketemplate_pi1 {
	#Read the template file
	content = FILE
	content.file = fileadmin/template/template.html
	
	#Define whick elements in the HTML 
	#which should be wraped in suppart comments
	elements {
		BODY.all = 1
		BODY.all.subpartMarker = DOCUMENT_BODY
		
		HEAD.all = 1
		HEAD.all.subpartMarker = DOCUMENT_HEADER
		
		HEAD.rmTagSections = title
		
		TD.id.menu = 1
		TD.id.breadcrumb = 1
		DIV.id.content_left-col = 1
		TD.id.content_right-col = 1
	}
	
	#Prefix all relatiev paths with this value
	relPathPrefix = fileadmin/template/
}


#Main template cObject for BODY
temp.mainTemplate = TEMPLATE
temp.mainTemplate {
	#Feeding content from parser
	template =< plugin.tx_automaketemplate_pi1
	#Select content between BODY
	workOnSubPart = DOCUMENT_BODY
		
	#Substitute content in Menu with some stuff
	subparts.menu < temp.menu
	
	#Substitute content
	subparts.content_right-col < styles.content.get
	
	#Substitute Submenu
	subparts.content_left-col < temp.menu_2
	
	#Breadcrumb
	subparts.breadcrumb < temp.breadcrumb
  }
}

#Main template cObject for HEAD
temp.headTemplate = TEMPLATE
temp.headTemplate {
	#Feeding content from parser
	template =< plugin.tx_automaketemplate_pi1
	#Select head-part
	workOnSubpart = DOCUMENT_HEADER
}

# Default PAGE object:
page = PAGE
page.typeNum = 0

# Output as XHTML
page.config.doctype = xhtml_trans

#Copy to bodysection
page.10 < temp.mainTemplate

#Copy header
page.headerData.10 < temp.headTemplate

------ CODESNIPPET - TYPOSCRIPT TEMPLATE END-------


Hope you can help me! 



/Dan


More information about the TYPO3-english mailing list