|
1 | | -.. This reStructured text file has been automatically generated, do not change. |
2 | | -.. Source: https://github.com/TYPO3/typo3/blob/main/typo3/sysext/fluid/Classes/ViewHelpers/Page/TitleViewHelper.php |
3 | | -
|
4 | | -:edit-on-github-link: https://github.com/TYPO3/typo3/edit/main/typo3/sysext/fluid/Classes/ViewHelpers/Page/TitleViewHelper.php |
5 | 1 | :navigation-title: page.title |
6 | 2 |
|
7 | 3 | .. include:: /Includes.rst.txt |
|
12 | 8 | Page.title ViewHelper `<f:page.title>` |
13 | 9 | ====================================== |
14 | 10 |
|
| 11 | +.. versionadded:: 14.0 |
| 12 | + |
| 13 | +The ViewHelper allows setting the page title directly from Fluid templates. |
| 14 | + |
| 15 | +This is especially useful for Extbase plugins that need to set a page title |
| 16 | +in their detail views without having to implement their own custom `page title |
| 17 | +provider <https://docs.typo3.org/permalink/t3coreapi:pagetitle>`_. |
| 18 | + |
| 19 | +.. code-block:: html |
| 20 | + :caption: EXT:my_extension/Resources/Private/Templates/Item/Show.html |
| 21 | + |
| 22 | + <f:page.title>{item.title}</f:page.title> |
| 23 | + |
| 24 | + <h1>{item.title}</h1> |
| 25 | + <p>{item.description}</p> |
| 26 | + |
| 27 | +The ViewHelper can also be used with static content: |
| 28 | + |
| 29 | +.. code-block:: html |
| 30 | + :caption: EXT:my_extension/Resources/Private/Templates/Static/About.html |
| 31 | + |
| 32 | + <f:page.title>About Us - Company Information</f:page.title> |
| 33 | + |
| 34 | + <h1>About Us</h1> |
| 35 | + <p>Welcome to our company...</p> |
| 36 | + |
15 | 37 | .. typo3:viewhelper:: page.title |
16 | 38 | :source: ../../Global.json |
| 39 | + :display: tags,gitHubLink |
| 40 | + :noindex: |
| 41 | + |
| 42 | +The ViewHelper integrates seamlessly with TYPO3's existing `page title |
| 43 | +provider <https://docs.typo3.org/permalink/t3coreapi:pagetitle>`_ |
| 44 | +system and respects the configured provider priorities. |
0 commit comments