[英]TYPO3 7.6 link a file with typoscript typolink and target?
has someone also this problem: I have a Typoscript Code which generate a Link to a Fileressource. 有人也有这个问题:我有一个Typoscript代码生成一个文件资源的链接。 If I add a
target = _blank
nothing change in frontend. 如果我添加一个
target = _blank
,前端没有任何变化。 If i Link a page target = _blank
is working. 如果我链接页面
target = _blank
正在工作。
So I think my Typoscript is fine, im able to link to the file. 所以我认为我的Typoscript很好,我能够链接到该文件。 And if I link to a page
target = _blank
is working. 如果我链接到页面
target = _blank
正在工作。 But it seems not possible to have a typolink to a fileressource with target = _blank
. 但似乎不可能使用
target = _blank
对文件源进行typolink。 I had also tried extTarget and nothing happened. 我也尝试过extTarget,没有任何反应。
renderObj = TEXT
renderObj.value = || DOWNLOAD || LOW
renderObj.value.typolink.parameter.data=file:current:originalUid // file:current:uid
renderObj.value.typolink.parameter.wrap = file:|
# this is working:
# renderObj.value.typolink.parameter=4
renderObj.value.typolink.target = _blank
renderObj.value.typolink.ATagParams = || class="download_high" || class="download_low"
I did'nt know the target parameter for the typolink object. 我不知道typolink对象的目标参数。 I do blank links always this style:
我总是这样做空白链接:
lib.logo = IMAGE
lib.logo {
file = EXT:theme/Resources/Public/img/logo.jpg
file {
height = 43
}
stdWrap.typolink.parameter = 1 _blank
}
This generates a link on a page with uid and _blank for new window. 这会在页面上生成一个链接,其中包含uid和_blank用于新窗口。 Maybe you can add it to your wrap like
也许你可以把它添加到你的包装中
renderObj.value.typolink.parameter.wrap = file:| _blank
? ?
I saw you gave the solution ... AFTER I read and elaborated all, I propose your answer as answer (styled); 我看到你给出了解决方案......在我阅读并详细说明之后,我提出你的答案作为答案(风格);
renderObj = TEXT
renderObj {
value = || DOWNLOAD || LOW
typolink {
parameter.data = file:current:originalUid // file:current:uid
parameter.wrap = file:|
fileTarget = _blank
ATagParams = || class="download_high" || class="download_low"
}
}
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.