简体   繁体   English

TYPO3扩展输出由TYPO3改变?

[英]TYPO3 Extension output altered by TYPO3?

TYPO3 seems to alter the output of my Frontend extension. TYPO3似乎改变了我的Frontend扩展的输出。

Simple Testcase: 简单的测试用例:

function main($content, $conf)
{
        $this->conf = $conf;
        $this->pi_setPiVarDefaults();
        $this->pi_loadLL();

        return '<a href="#test">test</a>';
}

When I call a page with this extension in the frontend i get: 当我在前端调用带有此扩展名的页面时,我得到:

<a href="pagename/?no_cache=1&action=show&id=3378#test">test</a>

Basically it prepends the path I used to access the page to the anchor link. 基本上,它会将我用于访问页面的路径添加到锚链接。 What could be responsible for this behaviour? 什么可能导致这种行为? RealURL? RealURL?

How can I disable it? 我该如何禁用它?

You probably have somwhere in your TS template (in Setup) enabled prefixing: 您可能在TS模板(在安装程序中)启用了somwhere前缀:

config.prefixLocalAnchors = all

Note, that if you have set config.baseURL=http://some.tld/ and enabled RealURL this is required, otherwise all anchor links will be redirected to the main page: 请注意,如果您已设置config.baseURL=http://some.tld/并启用了RealURL这是必需的,否则所有锚链接都将重定向到主页面:

http://some.tld/#test

instead of 代替

http://some.tld/pagename/sub/other-sub#test

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

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