简体   繁体   English

TYPO3-打字稿反向链接

[英]TYPO3 - typoscript backlink

I am currently looking all over the web for a solution to create a link back to the referring page. 我目前正在网上寻找解决方案,以创建指向引荐页的链接。

atm I am just using JS eg atm我只是用JS例如

<a href="javascript:history.back()">« back</a>

I would like to add the information to which page the link leads back using the page title of the referring page eg 我想使用引荐页面的页面标题来添加链接指向的页面信息,例如

<a href="javascript:history.back()">« back to: <referring-page-title></a>

is there any way to create such a backlink with typoscript or fluid? 有什么办法可以用打字稿或文字来创建这样的反向链接?

thx for helping me out, rgds stooky 谢谢你帮我,rgds stooky

You could also check the referrer in TYPO3 but that would lead to the problem that the full cache can't be cached anymore. 您还可以检查TYPO3中的引荐来源网址,但这将导致无法再缓存完整缓存的问题。 I woudln't recommend that. 我不建议这样做。

What about misusing eg the local storage, write all page information you need into some JS variables, save it into the local storage whenever a link is triggered and use it from there? 滥用例如本地存储,将所需的所有页面信息写入一些JS变量,每当触发链接就将其保存到本地存储中,然后从那里使用它怎么办?

If you are in the page tree you can use something like this: 如果您在页面树中,则可以使用以下内容:

lib.backlink = HMENU
lib.backlink {
    entryLevel = 2
    special = browse
    special.items = up
    wrap = <nav id="backlink">|</nav>

    1 = TMENU
    1.NO.stdWrap.dataWrap = <span>back to:&nbsp;| </span>
}

otherwise 除此以外

renderObj.10 = TEXT
renderObj.10.value = <a href="javascript:history.back()">Go back</a>

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

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