[TYPO3-english] Inlcuding javascripts in bottom

messsi messsi messsi bilal_ at live.nl
Mon Jun 7 15:51:44 CEST 2010


Hi Bing,

If you want to include javascript file(s) to your page(s) by using typoscript AND if you want the javascript file(s) to be localized just before the body tag, you can use this property of typoscript "includeJSFooter".

example:
page.includeJSFooter {
    file001 = pathtojsfiles/blah.js
    file002 = pathtojsfiles/blah2.js
}

[1] http://typo3.org/documentation/document-library/core-documentation/doc_core_tsref/4.3.1/view/1/6/
[2] http://devblog.wizzbit.net/2010/06/02/javascript-before-the-body-tag-with-typoscript/
[3] http://www.typo3-addict.com/2009/10/typo3-seo-the-basics/

Hth



> From: bing at idar.nl
> Date: Mon, 7 Jun 2010 15:31:52 +0200
> To: typo3-english at lists.typo3.org
> Subject: [TYPO3-english]  Inlcuding javascripts in bottom
> 
> Hallo group,
> 
> Today i was trying to change some extention Kiwislider.
> As i found out the default place the extention includes its javascript is on 
> top.
> the extention does this with:
> 
> $kiwi_slider = <<<EOD
> --## script ## --
> EOD;
> $js.= t3lib_div::wrapJS($kiwi_slider);
> 
> $GLOBALS['TSFE']->additionalHeaderData[$this->extKey] = $js;
> 
> As the function says its added in the HeaderData. However i want my 
> javascript on the bottom of my page.
> fot instant on page.1000
> 
> Currently i removed the script from the php file and included it trough 
> typoscript. however.
> I would like to know how i can change the location of the inlcude to for 
> instant
> page.1000 or (what ive found so far) like right before the </body> tag ?
> What function do i use :) ?
> 
> Thanks
> 
> Bing van Moorsel
> 
> 
> 
> 
> _______________________________________________
> TYPO3-english mailing list
> TYPO3-english at lists.typo3.org
> http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-english
 		 	   		  
_________________________________________________________________
De Nieuwste Internet Explorer speciaal voor Hotmail, download nu gratis
http://www.microsoft.com/netherlands/ie8/hotmail.htm


More information about the TYPO3-english mailing list