簡體   English   中英

登錄后端用戶的前端上下文中的 TypoScript 條件(9.5 LTS,表達式語法)

[英]TypoScript condition in frontend context (9.5 LTS, expression syntax) for backend users logged in

嘿嘿,我正在使用 TYPO3 CMS 9.5 LTS 中的新表達式語法。 當用戶具有活動的 BE 登錄時,我試圖在 FE 中顯示一些內容。 該功能首先建議:

[backend.user.isLoggedIn == true]
...
[END]

它應該工作?! 但不起作用並拋出:

TYPO3 Deprecation Notice: The old condition syntax will be removed in TYPO3 v10.0, use the new expression language. Used condition: [backend.user.isLoggedIn === true]

[getTSFE().beUserLogin > 0]
...
[END]

有效但拋出: TYPO3 Deprecation Notice: Property $TSFE->beUserLogin is not in use anymore as this information is now stored within the backend.user aspect.

那么這里有什么問題呢?

根據TSREF ,對象“后端”僅在 BE (TSconfig) 中可用。

對於前端(TS 設置),您可以使用[getTSFE() && getTSFE().isBackendUserLoggedIn()]

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM