[英]What is the difference between f:link and f:uri ViewHelpers in TYPO3 fluid
There are a number of viewhelpers which can be used in Fluid.有许多视图助手可以在 Fluid 中使用。 The f:link and f:uri seem to do basically the same thing.
f:link和f:uri似乎做基本相同的事情。
For example:例如:
This results in the following questions:这导致以下问题:
link
viewhelpers in Fluid render a full HTML link, so <a href="..." ...>...</a>
. link
视图助手都呈现完整的 HTML 链接,因此<a href="..." ...>...</a>
。 In comparison all uri
viewhelpers only render the URI, thus what would end up within href
of a link or eg a src()
in CSS.uri
视图助手都只呈现 URI,因此最终会出现在链接的href
中或例如 CSS 中的src()
中。 There are some docs around the net which cover parts of Fluid but there is no definite guide which contains everything.网上有一些文档涵盖了 Fluid 的部分内容,但没有包含所有内容的明确指南。 Here are a few resources:
以下是一些资源:
You are very welcome to improve the docs wherever you see something amiss.非常欢迎您在发现有问题的地方改进文档。 :-)
:-)
f.link.external
actually creates a link and f.uri
just outputs the uri . f.link.external
实际上创建了一个链接,而f.uri
只是输出uri 。
Fluid Source:流体来源:
<f:link.external uri="https://typo3.org">f.link.external</f:link.external>
Result:结果:
<a href="https://typo3.org">f.link.external</a>
Fluid Source:流体来源:
<f:uri.external uri="https://typo3.org">f.uri.external</f:uri.external>
Result:结果:
https://typo3.org
It might be a good idea to update the documentation for f.uri.external because it is misleading.更新f.uri.external的文档可能是个好主意,因为它具有误导性。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.