【问题标题】:TYPO3 8.7.22 Navbar CSS setupTYPO3 8.7.22 导航栏 CSS 设置
【发布时间】:2020-09-23 12:09:45
【问题描述】:

我使用 TYPO3 版本 8.7.22,尝试通过 globalVar 使用上传的 CSS 显示我的网站。目前,我可以使用新的 CSS 视图查看每个页面。但是每次我更改页面(NavBar)时,我都必须在 URL 中添加参数“?test-css=1”。

这里是我之前的代码:

[globalVar = GP:test-css > 0]
    page.includeCSS.testStyle = fileadmin/css/customize-test.css
    
[global]

这是我的菜单:

有人可以帮我在使用 NavBar 时不要更改 URL 中的参数吗?

提前致谢。

【问题讨论】:

    标签: css typo3 navbar typoscript typo3-8.x


    【解决方案1】:

    您需要为 TYPO3 中生成的每个 URL 自动考虑这个特殊的 URL 参数。

    这可以配置为:

    config {
        // if you have no other linkVars:
        linkVars = test-css(1)
    
        // in case you have other linkVars defined:
        linkVars := addToList(test-css(1))
    }
    

    manual


    要考虑的小副作用:

    如果您想避免使用此参数污染您的缓存,您需要确保具有此参数的页面有自己的缓存变体。

    您已经使用此参数的条件完成了此操作:

    [globalVar = GP:test-css > 0]
       :
    [global]
    

    【讨论】:

      猜你喜欢
      • 2016-12-11
      • 2014-01-27
      • 2015-11-10
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多