[TYPO3-english] How to add some specific code just next to opening body tag via Typoscript
Ralf-Rene Schröder
ralf.rene at online.de
Sun Nov 4 02:49:57 CET 2012
Am 04.11.2012 00:23, schrieb UGUR KOCAK:
> Hi,
> I am using TYPO3 v4.7 to build a portal.
> I need to insert Facebook Javascript SDK just after opening body tag as in the documents. I want to place Facebook social plugins via Typoscript.
> But I don't want to loose pageUID and page specific css classes.
> The code I need to create is exactly like;
nice to see that you are using my if20 framework
so you could place your code this way
(with append directly after the opend body tag):
page.bodyTagCObject.stdWrap.append = TEXT
page.bodyTagCObject.stdWrap.append.value (
<div id="fb-root"></div>
<script>(function(d, s, id) {
var js, fjs = d.getElementsByTagName(s)[0];
if (d.getElementById(id)) return;
js = d.createElement(s); js.id = id;
js.src = "//connect.facebook.net/en_US/all.js#xfbml=1";
fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));</script>
)
--
image[FORMAT] - Ralf-René Schröder
http://image-format.eu ... Wir geben Ihrem Image das richtige Format
http://if-20.com ... YAML templates for TYPO3
More information about the TYPO3-english
mailing list