[英]typo3 add script into the head section
As I am a new at TYPO3 I would like to ask for some help. 由于我是TYPO3的新手,所以我想寻求帮助。 I have problems with adding scripts into the website, so could you tell how I can add script into the head section of the website.
我在向网站中添加脚本时遇到问题,所以您能告诉我如何在网站的顶部添加脚本。 Another thing that I would like to ask is how to create a new page and insert a script into it, but this script to be added only on that specific page.
我想问的另一件事是如何创建一个新页面并将脚本插入其中,但是该脚本只能在该特定页面上添加。 The last thing that I would like to know is how to add and an iframe (video for example).
我想知道的最后一件事是如何添加和iframe(例如视频)。 Thank you in advance!
先感谢您!
Thats a job for Typoscript! 那是Typoscript的工作!
How to add js scripts to any page (header) 如何将js脚本添加到任何页面(标题)
page.includeJS.identifier = EXT:your_ext_key/Resources/Public/JavaScript/filename.js
How to add js script to a specific page (header) 如何将js脚本添加到特定页面(标题)
[globalVar = TSFE:id=1234]
page.includeJS.identifier = EXT:your_ext_key/Resources/Public/JavaScript/filename.js
[global]
You can modify the "identifier" name. 您可以修改“标识符”名称。 It can be alphanumeric.
它可以是字母数字。
Put that typoscript either to the root page of your page in a Typoscript Template element from the backend, or have it sourced from another file. 将该错字放在后端的“错字模板”元素中,或者放在页面的根页面中,或者从另一个文件中获取。
See the typoscript docs for more input. 有关更多输入,请参见印刷文档 。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.