Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[FEATURE] Add absolute option to typolink VHs
In order to generate absolute URLs through the Typolink ViewHelpers of TYPO3 Fluid, a new fluid parameter "absolute" is added to the following ViewHelpers. * <f:link.typolink> * <f:uri.typolink> As typolink() is allowing this option, the generation of absolute URLs behaves the same way as typolink() itself does it. Use it like this: The ViewHelper code: - <f:link.typolink parameter="23">Link To My Page</f:link.typolink> generates: - <a href="index.php?id=23">Link to My Page</a> The ViewHelper code: - <f:link.typolink parameter="23" absolute="true">Link To My Page</f:link.typolink> generates: - <a href="https://www.mydomain.com/index.php?id=23">Link to My Page</a> The ViewHelper code: - <f:uri.typolink parameter="23" /> generates: - "index.php?id=23" The ViewHelper code: - <f:uri.typolink parameter="23" absolute="true" /> generates: - "https://www.mydomain.com/index.php?id=23" Resolves: #84120 Releases: master Change-Id: I6b6df0ebc8a7c257ab854959e5425debd0cadd5e Reviewed-on: https://review.typo3.org/55990 Tested-by: TYPO3com <no-reply@typo3.com> Reviewed-by: Frans Saris <franssaris@gmail.com> Reviewed-by: Georg Ringer <georg.ringer@gmail.com> Tested-by: Georg Ringer <georg.ringer@gmail.com> Reviewed-by: Wouter Wolters <typo3@wouterwolters.nl> Tested-by: Riccardo De Contardi <erredeco@gmail.com> Reviewed-by: Benni Mack <benni@typo3.org> Tested-by: Benni Mack <benni@typo3.org>
- Loading branch information
Showing
4 changed files
with
43 additions
and
2 deletions.
There are no files selected for viewing
33 changes: 33 additions & 0 deletions
33
...mentation/Changelog/master/Feature-84120-AbsoluteURLsForTypolinkViewHelpers.rst
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
.. include:: ../../Includes.txt | ||
|
||
======================================================== | ||
Feature: #84120 - Absolute URLs for typolink ViewHelpers | ||
======================================================== | ||
|
||
See :issue:`84120` | ||
|
||
Description | ||
=========== | ||
|
||
A new parameter "absolute" is added to the Fluid ViewHelpers `<f:uri.typolink>` and `<f:link.typolink>`, | ||
allowing to generate absolute links, like other ViewHelpers used for linking handle it already. | ||
|
||
|
||
Impact | ||
====== | ||
|
||
It is now possible to add the `absolute` parameter to the ViewHelpers above. | ||
|
||
.. code-block:: html | ||
|
||
<f:link.typolink parameter="23" absolute="true">Link To My Page</f:link.typolink> | ||
<f:uri.typolink parameter="23" absolute="true" /> | ||
|
||
generates | ||
|
||
.. code-block:: html | ||
|
||
<a href="https://www.mydomain.com/index.php?id=23">Link to My Page</a> | ||
https://www.mydomain.com/index.php?id=23 | ||
|
||
.. index:: Fluid, ext:fluid |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters