Index: typo3/template.php =================================================================== --- typo3/template.php (revision 4697) +++ typo3/template.php (working copy) @@ -1285,14 +1285,19 @@ * Includes a javascript library that exists in the core /typo3/ directory. The * backpath is automatically applied * - * @param string $lib: Library name. Call it with the full path - * like "contrib/prototype/prototype.js" to load it + * @param string $lib: Library. Call it with the full path + * @param string $name: Library name. Use unique name for identify + * like loadJavascriptLib("contrib/prototype/prototype.js", "prototype") to load it * @return void */ - function loadJavascriptLib($lib) { - if (!isset($this->JScodeLibArray[$lib])) { - $this->JScodeLibArray[$lib] = ''; + function loadJavascriptLib($lib, $name='') { + if (!$name) { + $name = $lib; } + if (!isset($this->JScodeLibArray[$name])) { + $this->JScodeLibArray[$lib] = ' + '; + } }