简体   繁体   中英

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. The f:link and f:uri seem to do basically the same thing.

For example:

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?).
  2. For which TYPO3 version is the documentation " Extbase Guide "? 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?
  1. All link viewhelpers in Fluid render a full HTML link, so <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.
  2. The Extbase guide is rarely updated and there is no real version dependency. If at all it applies to the latest LTS but you'll find outdated info here and there.
  3. There are some docs around the net which cover parts of Fluid but there is no definite guide which contains everything. 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

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

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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