[TYPO3-windows] Adding the Digg Button Javascript Include in Typo3 Page Head

Erik Svendsen erik at linnearad.no
Mon Jul 5 18:32:22 CEST 2010


When you are using brackets in TypoScript instead of curly brackets the 
content between the brackets are read exactly as it's written.

So following code:

page.headerData.10 = TEXT
page.headerData.10.value (
	<script type="text/javascript">
         our script
         </script>
)

If you have problem with delimiters - try to put the script inside <!-- 
script //-->

Personally I use this a lot.

Regards

Erik Svendsen



Den 05.07.2010 17:11, skrev Shade:
> Bernd, the issue with the approach of this method is that the content
> contains brackets () which would throw off the delimiter, i.e.
>
> page.headerData.10(
> something (something)
> )
>
> Is there a way to escape the brackets () and curly braces {} inside the
> 'something' content so that it doesn't break the script?
>
>
> On Sun, Jul 4, 2010 at 11:00 AM,<typo3-windows-request at lists.typo3.org>wrote:
>
>> Send TYPO3-windows mailing list submissions to
>>         typo3-windows at lists.typo3.org
>>
>> To subscribe or unsubscribe via the World Wide Web, visit
>>         http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-windows
>> or, via email, send a message with subject or body 'help' to
>>         typo3-windows-request at lists.typo3.org
>>
>> You can reach the person managing the list at
>>         typo3-windows-owner at lists.typo3.org
>>
>> When replying, please edit your Subject line so it is more specific
>> than "Re: Contents of TYPO3-windows digest..."
>>
>>
>> Today's Topics:
>>
>>    1. Re: TYPO3-windows Digest, Vol 68, Issue 1 (bernd pier)
>>
>>
>> ----------------------------------------------------------------------
>>
>> Message: 1
>> Date: Sat, 3 Jul 2010 17:20:40 +0200
>> From: bernd pier<berndpier at arcor.de>
>> Subject: Re: [TYPO3-windows] TYPO3-windows Digest, Vol 68, Issue 1
>> To: typo3-windows at lists.typo3.org
>> Message-ID:
>>         <mailman.27743.1278170728.610.typo3-windows at lists.typo3.org>
>> Content-Type: text/plain; charset=us-ascii
>>
>> you can use
>> page.headerData.10(
>> something
>> )
>> page.headerData.20(
>> another something
>> )
>> another option is:
>> put your javascript in a .js file and include it with
>>
>> page.includeJS.filename=pathtoyoutjs/file.js
>>
>> this will put you Javascript in the pageheader too
>>
>> Am 03.07.2010 um 12:00 schrieb typo3-windows-request at lists.typo3.org:
>>
>>> Send TYPO3-windows mailing list submissions to
>>>        typo3-windows at lists.typo3.org
>>>
>>> To subscribe or unsubscribe via the World Wide Web, visit
>>>        http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-windows
>>> or, via email, send a message with subject or body 'help' to
>>>        typo3-windows-request at lists.typo3.org
>>>
>>> You can reach the person managing the list at
>>>        typo3-windows-owner at lists.typo3.org
>>>
>>> When replying, please edit your Subject line so it is more specific
>>> than "Re: Contents of TYPO3-windows digest..."
>>>
>>>
>>> Today's Topics:
>>>
>>>    1. Adding the Digg Button Javascript Include in Typo3       Page Head
>>>       (Shade)
>>>
>>>
>>> ----------------------------------------------------------------------
>>>
>>> Message: 1
>>> Date: Fri, 2 Jul 2010 21:43:59 +0100
>>> From: Shade<oxytechx at gmail.com>
>>> Subject: [TYPO3-windows] Adding the Digg Button Javascript Include in
>>>        Typo3   Page Head
>>> To: typo3-windows at lists.typo3.org
>>> Message-ID:
>>>        <mailman.27659.1278103727.610.typo3-windows at lists.typo3.org>
>>> Content-Type: text/plain; charset=ISO-8859-1
>>>
>>> How do you include multiple lines of html content in the page HEAD ?
>>>
>>> I have previously used this in the typoscript setup:
>>>
>>> page.headerData.10 = HTML
>>> page.headerData.10.value =<link rel="alternate"
>> type="application/rss+xml"
>>> title="RSS 2.0" href="http://example.com/feed.xml" />
>>>
>>> However, we need to include multiple lines and the following code as it
>> is..
>>> the brackets () and curly braces {} will probably break something for
>> sure,
>>> so how to include this?
>>>
>>>
>>> <script type="text/javascript">
>>> (function() {
>>> var s = document.createElement('SCRIPT'), s1 =
>>> document.getElementsByTagName('SCRIPT')[0];
>>> s.type = 'text/javascript';
>>> s.async = true;
>>> s.src = 'http://widgets.digg.com/buttons.js';
>>> s1.parentNode.insertBefore(s, s1);
>>> })();
>>> </script>
>>>
>>> Junz
>>>
>>>
>>> ------------------------------
>>>
>>> _______________________________________________
>>> TYPO3-windows mailing list
>>> TYPO3-windows at lists.typo3.org
>>> http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-windows
>>>
>>> End of TYPO3-windows Digest, Vol 68, Issue 1
>>> ********************************************
>>
>>
>>
>> ------------------------------
>>
>> _______________________________________________
>> TYPO3-windows mailing list
>> TYPO3-windows at lists.typo3.org
>> http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-windows
>>
>> End of TYPO3-windows Digest, Vol 68, Issue 2
>> ********************************************
>>



More information about the TYPO3-windows mailing list