.. You may want to use the usual include line. Uncomment and adjust the path. .. include:: ../Includes.txt ======================== Page JavaScript Selector ======================== :Author: Kasper Skårhøj :Created: 2002-11-01T00:32:00 :Changed by: Jean-David Gadina :Changed: 2008-04-07T16:06:55 :Author: Jean-David Gadina :Email: info@macmade.net :Info 3: :Info 4: .. _Page-JavaScript-Selector: Page JavaScript Selector ======================== Extension Key: j **s\_select** Copyright 2000-2002, Jean-David Gadina, This document is published under the Open Content License available from http://www.opencontent.org/opl.shtml The content of this document is related to TYPO3 \- a GNU/GPL CMS/Framework available from www.typo3.com .. _Table-of-Contents: Table of Contents ----------------- **Page JavaScript Selector 1** **Introduction 2** What does it do? 2 Compatibility notice 2 **Users manual 2** Installation 2 Extension update 2 Static TypoScript template 3 Adding a specific JavaScript to a page 3 **Administration 4** Specifying the JS storage directory 4 **Configuration 5** Reference 5 **Known problems 5** **To-Do list 5** **Changelog 5** .. _Introduction: Introduction ------------ .. _What-does-it-do: What does it do? ^^^^^^^^^^^^^^^^ This extension allows you to select one or more javascript(s) for each page of the tree. .. _Compatibility-notice: Compatibility notice ^^^^^^^^^^^^^^^^^^^^ Prior to version 1.0.0, the js\_select extension should run on any version of TYPO3, on PHP 4 and 5. Version 1.0.0 and later are designed exclusively for PHP 5.2. .. _Users-manual: Users manual ------------ .. _Installation: Installation ^^^^^^^^^^^^ The installation of this extension is very simple. Just connect to the Typo3 Extension Repository and download «Page JavaScript Selector» (js\_select), located in the backend section. From the extension manager, you'll be able to specify the directory where you will store your JS files (you must manually create this folder). By default, it's fileadmin/js/. Note that you can specify multiple directories, by separating them by a comma. Specified paths are relative to the TYPO3 site path. You can also choose from here the allowed extensions for the JS files. If you keep your JS files in sub-directories, you can also get them by enabling the third option. |img-1| .. _Extension-update: Extension update ^^^^^^^^^^^^^^^^ If you are upgrading from an older version, you will have to update the database. From the extension manager, you'll see an update option. If you don't see this item in the menu, that means that your database doesn't need to be updated. |img-2| On the update page, you'll see the list of the TYPO3 pages that will be updated. |img-3| Simple click the «Update» button, and you're done. .. _Static-TypoScript-template: Static TypoScript template ^^^^^^^^^^^^^^^^^^^^^^^^^^ In order to enable this new version, you'll also have to include it's static template into your main TypoScript template, as it's not included by default anymore. |img-4| .. _Adding-a-specific-JavaScript-to-a-page: Adding a specific JavaScript to a page ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Once the extension is installed, you'll be able to specify one or more JavaScript(s) for each of your pages. This is done through the page headers: |img-5| You'll find in the selector all the JS files located in the directory you've set during the install process. Just click on a filename to add it. You'll also be able to define the inheritance mode for the selected JavaScripts. These options of course only have an effect if the recursivity option is set (see the next section). The default setting (normal) will allow inheritance If «Skip» is set, selected JavaScripts from this page won't be inherited, but JavaScripts from the pages above will be. If «Stop» is set, selected JavaScripts from this page and the above won't be inherited. .. _Administration: Administration -------------- The whole configuration of the plugin is available through the constant editor. Please see the Configuration section for more details. |img-6| .. _Specifying-the-JS-storage-directory: Specifying the JS storage directory ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ You can override the settings made from the extension manager about the JS directory through the page TSConfig. In order to do this, edit the properties of a page, and place the following code in the TSConfig field: :: tx_jsselect.jsDir = path/to/a/directory,path/to/another/directory Specified paths are relative to the TYPO3 site path. .. _Configuration: Configuration ------------- .. _Reference: Reference ^^^^^^^^^ Here's the complete reference of the TypoScript options for the plugin. Remember that you can set each one through the constant editor. .. ### BEGIN~OF~TABLE ### .. _recursive: recursive """"""""" .. container:: table-row Property recursive Data type boolean Description Also check for javascript(s) on the top pages. Default 0 .. _defer: defer """"" .. container:: table-row Property defer Data type boolean Description Enable the JavaScript defer option. Default 0 .. _jsComments: jsComments """""""""" .. container:: table-row Property jsComments Data type boolean Description Add JS comments in the HTML source code. Default 1 .. _type: type """" .. container:: table-row Property type Data type string Description The type parameter of the