[TYPO3] Javascript Header Reference by default

Peter Klein peter at umloud.dk
Wed Jun 20 16:22:46 CEST 2007


Hi Sancar.
There's a couple of ways to do that:

The old method:

1) Create 2 files inside your extension folder, named 
"ext_typoscript_constants.txt" and "ext_typoscript_setup.txt"

2) Fill "ext_typoscript_setup.txt" with your typoscript setup code, and 
"ext_typoscript_constants.txt" with your constants setup.


The new method:

1) Create a folder named "static" in your extension folder.

2) Inside the folder, you create a file named "setup.txt" and one named 
"constants.txt"

3) Fill "setup.txt" with your typoscript setup code, and "constants.txt" 
with your constants setup.

4) Then in your "ext_tables.php" you do something like this, to add the 
static folder.

t3lib_extMgm::addStaticFile($_EXTKEY, 'static/', 'Name of your Extension');

5) To activate it in TYPO3 , you need to include the static template 'Name 
of your Extension' on your TS template.


-- 
Peter Klein/Umloud Untd

"Sancar Saran" <sancar.saran at evodot.com> skrev i en meddelelse 
news:mailman.340575.1182329636.21067.typo3-english at lists.netfielders.de...
> Hi
>
> After some fine tune search I found this
>
> page.headerData.30 = TEXT
> page.headerData.30.value (
>   <script src="fileadmin/scripts.js" type="text/javascript"></script>
> )
>
> I tested and it works.
>
> My Question is
>
> To activate this I have to modify template. How can I make this default. 
> When
> I add this extension in page content I want this Typoscript add by 
> default.
>
> PS: I add this into pageTSConfig.txt nothing was happen...
>
> Thanks for help
>
> Regards
>
> Sancar 




More information about the TYPO3-english mailing list