[TYPO3] html with javascript as a content element

Tyler Kraft headhunterxiii at yahoo.ca
Thu Dec 29 11:45:59 CET 2005


Hi

Like so often these are all easy things that could be found in TSref. 
Always keep a copy handy.

Jörg Verstraete wrote:
> Peter,
> 
> Thanks! But I think I need a little more help... I added the 
> page.headerData stuff in the TSConfig box of the page header in which 
> I'd like to put the form (is that the right location)?

You need to add it in the page template setup, not the page header 
TSconfig (a bit confusing, I know).  And as you only want it on a 
certain page you should probably have a look at the conditionals section.

Then have a look at the correct way to include things using =, {}, etc

You need to put:
page.headerData = <link rel="stylesheet" type="text/css" media="all" 
href="img/style.css" /> for single lines or

page.headerData (
	<link rel="stylesheet" type="text/css" media="all" href="img/style.css" />
	<script>
	....
	</script>
	<style>
	...
	<style>
)
for multiple lines.  You can then put anything into a page head like 
this.  And if you want to have more than one instance of headerData you 
can use numbering with it also

page.headerData.10 = <link rel="stylesheet" type="text/css" media="all" 
href="img/style.css" />

page.headerData.20 (
	<link rel="stylesheet" type="text/css" media="all" href="img/style2.css" />
	<script>
	....
	</script>
	<style>
	...
	<style>
)

hth
good luck :-)



More information about the TYPO3-english mailing list