如何从 TYPO3 中的 Ajax 页面删除 CSS 样式的 conted 标头输出?
这是我的打字稿:
ajax = PAGE
ajax {
typeNum = 1234
# this solution is working, but then I don't have flexform values
# 10 < tt_content.list.20.myextension_pi1
10 < styles.content.get
10 {
select.where = colpos = 0
select.andWhere = list_type='myextension_pi1'
}
config {
disableAllHeaderCode = 1
additionalHeaders = Content-type:application/json
xhtml_cleaning = 0
admPanel = 0
debug = 0
no_cache = 1
}
}
这是我的 Ajax 结果 - Hello World 是 tt_content 标头:
<h2 class="csc-firstHeader">Hello World</h2>{"valid":false}
我已经尝试过但没有成功:
lib.stdheader >
lib.header >
这将影响所有页面类型,对于标准输出,我想保留 tt_content 标头输出。
你不应该放置tt_content
包含插件的元素,但插件本身,例如:
ajax = PAGE
ajax {
typeNum = 1234
10 < plugin.myextension_pi1
config {
disableAllHeaderCode = 1
additionalHeaders = Content-type:application/json
xhtml_cleaning = 0
admPanel = 0
debug = 0
no_cache = 1
}
}
也可以看看类似的问题
在这种情况下,您不需要修改 CSC。
当然,在这种情况下,您需要通过 TS 来配置您的扩展(最好使用将 TS 配置与 FlexForm 合并的选项,像这样)
选择:
您还可以使用TypoScript 条件仅用于清除给定页面上的 CSC,即。
[globalVar = TSFE:id = 123]
lib.stdheader >
lib.header >
[end]
or for type
仅参数(我在某处读到它有一个错误,但尚未确认,所以它应该也可以工作):
[globalVar = GP:type = 1234]
lib.stdheader >
lib.header >
[end]
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)