Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/typo3/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
TYPO3-扩展插件的打字脚本_Typo3_Typo3 6.2.x - Fatal编程技术网

TYPO3-扩展插件的打字脚本

TYPO3-扩展插件的打字脚本,typo3,typo3-6.2.x,Typo3,Typo3 6.2.x,我只想在带有特定插件的页面上执行一些打字脚本命令: page.includeCSS { } page.includeJS { } lib.my_bloc = COA etc... 我将我的打字脚本代码移到文件typo3conf/ext/my_company\u plugin/Configuration/typoscript/setup.txt中,但它似乎不起作用。如何让它工作 此外,我无法为我的模块设置默认的storagepid。我希望所有新实体都存储在同一个特定文件夹中(顺便说一句,uid

我只想在带有特定插件的页面上执行一些打字脚本命令:

page.includeCSS { }
page.includeJS { }
lib.my_bloc = COA
etc...
我将我的打字脚本代码移到文件typo3conf/ext/my_company\u plugin/Configuration/typoscript/setup.txt中,但它似乎不起作用。如何让它工作

此外,我无法为我的模块设置默认的storagepid。我希望所有新实体都存储在同一个特定文件夹中(顺便说一句,uid 184),但我的TS into setup.txt无效,数据库中的pid是用户所在的页面,而不是184

#constant
module.tx_company_events.persistence.storagePid = 184

#setup
module.tx_company_events.persistence.storagePid = {$module.tx_company_events.persistence.storagePid}

如果您想为特定的页面插件添加打字脚本,那么您可以使用下面的打字脚本条件

// if get your plugin parameters then below typoscript works
[globalVar = GP:tx_extension_key|var1 > 0]
  // write your typoscript
  page.includeCSS { }
  page.includeJS { }
  lib.my_bloc = COA
[end]

// FOr specific pageId
[globalVar = TSFE:id = 10]
  page.includeCSS { }
  page.includeJS { }
  lib.my_bloc = COA
[end]

同样对于StoragePid,请确保在根模板中包含ext中的打字脚本。

以下是有关打字脚本条件的完整文档:-用于将设置应用于嵌套页面的
PIDinRootline
可能也很有趣。旁注:尽量减少键入脚本条件的数量,因为这些条件是在每个缓存页面上动态计算的,可能会稍微降低性能。如果这些设置只属于特定的扩展名,那么使用
PageRenderer
并加载CSS/JS文件可能会有一个选项。