Reputation: 1
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 e.g.
<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 e.g.
<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
Upvotes: -1
Views: 763
Reputation: 191
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: | </span>
}
otherwise
renderObj.10 = TEXT
renderObj.10.value = <a href="javascript:history.back()">Go back</a>
Upvotes: 0
Reputation: 7939
You could also check the referrer in TYPO3 but that would lead to the problem that the full cache can't be cached anymore. I woudln't recommend that.
What about misusing e.g. 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?
Upvotes: 0