There are four different configuration possibilities in three different ways ;-).
Configuration possibilities:
You can define, that only jQuery should be included.
You can limit, the plugins of jQuery, which should be included.
You can define, if you want the compressed or uncompressed javascript-code to be included.
You can define, if you want the jQuery-Compatibility Plugin for 1.1 to be included.
Process order:
you can set the configuration in your extension
tx_jquery::setBaseOnly(FALSE);
tx_jquery::setPlugins(array('iutil','idrag','idrop','isortables'));
tx_jquery::setCompressed(TRUE);
tx_jquery::setCompatibility(TRUE);
you can define these values through TypoScript
plugin.tx_jquery.base_only = false
plugin.tx_jquery.plugins = iutil,idrag,idrop,isortables
plugin.tx_jquery.compressed = true
plugin.tx_jquery.compatibility = true
the default values are used
base_only is set to false
plugins are empty, so no one is included
compressed is set to true
compatibility is set to true
Reference
TypoScript
Property: | Data type: | Description: | Default: |
|---|---|---|---|
base_only | string | TRUE or FALSE If TRUE is typed, the configuration parameter plugins have no effect | FALSE |
plugins | string | Comma-separated list of plugins, which should be included | empty |
compressed | string | TRUE or FALSE If FALSE is typed, the src and the plugins from the uncompressed-folders is used. | TRUE |
compatibility | string | TRUE or FALSE If TRUE is typed, the compatibility plugin for 1.1 is included. | TRUE |
[tsref:plugin.tx_jquery]
PHP functions in class tx_jquery
Function/Property: | Data type: | Description: | Default: |
|---|---|---|---|
includeLib() | Include the jquery library and additional plugins. Any configuration has to be done before with the functions setBaseOnly(), setPlugins() and setCompressed(). | ||
setBaseOnly() | Defines if only the jQuery-library should be included | ||
$var | boolean | If TRUE, only this lib is included | FALSE |
setPlugins() | Defines the plugins of jQuery, which should be included | ||
$plugins | array | Array of plugins, which jQuery should be include | array() |
setCompressed() | Defines if compressed or uncompressed jQuery-libraries should be included | ||
$var | boolean | If FALSE, uncompressed scripts are included | TRUE |
setCompatibility() | Defines if 1.1-compatibility-plugin should be included | ||
$var | boolean | If TRUE, the compatibility-plugin is included | TRUE |