简体   繁体   English

TYPO3流体中的f:link和f:uri ViewHelpers有什么区别

[英]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:linkf:uri似乎做基本相同的事情。

For example:例如:

  • f:link.external : "A ViewHelper for creating links to external targets." f:link.external“用于创建指向外部目标的链接的 ViewHelper。”
  • f.uri.external : "This ViewHelper creates a link to an external page" f.uri.external“此 ViewHelper 创建一个指向外部页面的链接”

This results in the following questions:这导致以下问题:

  1. What's the difference between f.link.external and f.uri.external (and which is supported in which Fuid / TYPO3 version?). f.link.external 和 f.uri.external 之间有什么区别(哪个 Fuid / TYPO3 版本支持哪个?)。
  2. For which TYPO3 version is the documentation " Extbase Guide "?文档“ Extbase 指南”是针对哪个 TYPO3 版本的? Because usually you see a version in lower left column, here it just shows 'latest'.因为通常你会在左下栏中看到一个版本,这里它只显示“最新”。
  3. What is the best up-to-date resource for Fluid ViewHelpers using TYPO3 8?使用 TYPO3 8 的 Fluid ViewHelpers 的最佳最新资源是什么?
  1. All link viewhelpers in Fluid render a full HTML link, so <a href="..." ...>...</a> . Fluid 中的所有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()中。
  2. The Extbase guide is rarely updated and there is no real version dependency. Extbase 指南很少更新,也没有真正的版本依赖。 If at all it applies to the latest LTS but you'll find outdated info here and there.如果它适用于最新的 LTS,但您会在这里和那里找到过时的信息。
  3. 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


f.link.external f.link.external

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>

f.uri.external f.uri.external

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.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM