Login / Status
developer.Resource
Home . Documentation . Document Library . Extension Manuals
Sponsors
hosted by punkt.deTYPO3 and Open Source Magazine

1.3. Configuration

There are four different configuration possibilities in three different ways ;-).

Configuration possibilities:

  1. You can define, that only jQuery should be included.

  2. You can limit, the plugins of jQuery, which should be included.

  3. You can define, if you want the compressed or uncompressed javascript-code to be included.

  4. You can define, if you want the jQuery-Compatibility Plugin for 1.1 to be included.

Process order:

  1. you can set the configuration in your extension

    1.  tx_jquery::setBaseOnly(FALSE);

    2.  tx_jquery::setPlugins(array('iutil','idrag','idrop','isortables'));

    3.  tx_jquery::setCompressed(TRUE);

    4.  tx_jquery::setCompatibility(TRUE);

  2. you can define these values through TypoScript

    1. plugin.tx_jquery.base_only = false

    2. plugin.tx_jquery.plugins = iutil,idrag,idrop,isortables

    3. plugin.tx_jquery.compressed = true

    4. plugin.tx_jquery.compatibility = true

  3. the default values are used

    1. base_only is set to false

    2. plugins are empty, so no one is included

    3. compressed is set to true

    4. 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