简体   繁体   English

TYPO3 v10 - 绝对链接 - config.absRefPrefix 死了吗?

[英]TYPO3 v10 - absolute links - config.absRefPrefix dead?

How to tell TYPO3 v10 (globally) to generate absolute links in frontend?如何告诉 TYPO3 v10(全局)在前端生成绝对链接? config.absRefPrefix doesn't seem to work any longer. config.absRefPrefix似乎不再起作用。 Also, using absolute urls as base in site configuration doesn't have any effect.此外,在site configuration中使用绝对 url 作为base没有任何效果。 Still relative links in frontend.仍然是前端的相对链接。

EDIT: config.absRefPrefix seems to work for embedded resources (script, img etc.) but not for usually generated hyperlinks ( MenuProcessor , RTE links etc.).编辑: config.absRefPrefix似乎适用于嵌入式资源(脚本、img 等),但不适用于通常生成的超链接( MenuProcessor 、RTE 链接等)。 Do i really need to set option absolute=1 for all my links generated by view helpers and configure RTE processing to generate absolute links?我真的需要为视图助手生成的所有链接设置选项absolute=1并配置 RTE 处理以生成绝对链接吗? Thought that's why the global option "absRefPrefix" exists...认为这就是为什么存在全局选项“absRefPrefix”的原因......

This problem already exists since TYPO3 v9.从 TYPO3 v9 开始,这个问题就已经存在。 There is a ticket in the bug tracker regarding this issue.错误跟踪器中有一张关于此问题的票 I assume that in TYPO3 v12 config. absRefPrefix我假设在 TYPO3 v12 config. absRefPrefix config. absRefPrefix might be removed completely. config. absRefPrefix可能会被完全删除。

In the ticket comments you can find a number of hints, how to implement absolute links in various places:在票的评论中你可以找到一些提示,如何在各个地方实现绝对链接:

  • use (NO/ACT/...).stdWrap.typolink.forceAbsoluteUrl = 1 for HMENU对 HMENU 使用(NO/ACT/...).stdWrap.typolink.forceAbsoluteUrl = 1
  • for links in the CKEditor RTE this config make every link absolute:对于 CKEditor RTE 中的链接,此配置使每个链接都是绝对的:
     lib.parseFunc_RTE.tags.a.typolink { forceAbsoluteUrl = 1 forceAbsoluteUrl.scheme = https }
  • if you want to globally rewrite all links to absolute links, you can implement the middleware mentioned in the ticket .如果要全局重写所有链接为绝对链接,可以实现ticket中提到的中间件。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM