最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

TYPO3 (v13) fluid template onClick atrribute not possible - Stack Overflow

programmeradmin0浏览0评论

Is there a way to write this in the fluid template?

<a onclick="history.back()">Back</a>

I have tried these options and they do not work:

<a onclick="history.back()">Back</a>
<f:format.raw><a onclick="history.back()">Back</a></f:format.raw>
<f:link.typolink parameter="1" additionalAttributes="{onclick: 'history.back()'}">Back</f:link.typolink>

All versions only result in the word “Back” or a link without an "onclick"

Is there a way to write this in the fluid template?

<a onclick="history.back()">Back</a>

I have tried these options and they do not work:

<a onclick="history.back()">Back</a>
<f:format.raw><a onclick="history.back()">Back</a></f:format.raw>
<f:link.typolink parameter="1" additionalAttributes="{onclick: 'history.back()'}">Back</f:link.typolink>

All versions only result in the word “Back” or a link without an "onclick"

Share Improve this question edited 2 days ago Lazinbee asked Feb 6 at 18:37 LazinbeeLazinbee 1811 silver badge8 bronze badges
Add a comment  | 

2 Answers 2

Reset to default 0

Please try

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

or

 <a href="javascript:history.go(-3)">Go back to step X</a>

to go back several steps.

Demystifying JavaScript history.back() and history.go() methods

the problem occurs in all templates of the extension. as written there is nothing special, simply a list of fields that are output. even if I insert this

<f:link.typolink parameter="1" additionalAttributes="{onclick: 'history.back()'}">Back</f:link.typolink>

only a link without onclick comes out

发布评论

评论列表(0)

  1. 暂无评论