我在TYPO3 Neos 1.2.1中创建了一个带有链接字段的自定义节点类型。当我将属性值传递给模板,并尝试将其呈现为链接时,会抛出一个execption:
Paths must not contain two consecutive slashes.
链接属性值为»node:// c969f0d4-2e01-87b9-25a8-6079c5a292fe«。 I have read,必须先将链接转换为URI。但是,建议的处理器对我的网站没有影响。
TypoScript2
prototype(Acme.MySitePackage:Teaser) < prototype(TYPO3.Neos:Content) {
templatePath = 'resource://Acme.MySitePackage/Private/Templates/NodeTypes/Teaser.html'
title = ${q(node).property('title')}
text = ${q(node).property('text')}
image = ${q(node).property('image')}
link = ${q(node).property('link')}
link.@process.convertUris = TYPO3.Neos:ConvertUris {
#forceConversion = true
}
}
流体模板
<f:debug>{link}</f:debug>
<neos:link.node node="{link}" />
答案 0 :(得分:1)
我敢打赌,如果您保留处理器并从模板中删除neos:link.node,那么
<f:debug>{link}</f:debug>
将显示指向该节点的http://链接。
错误发生在链接ViewHelper上,它需要一个节点或节点路径但是没有一个节点://不是一个href://链接(也许我们将来应该支持它)。所以你可以使用普通的<a href="{link}">