Skip to content

Commit 5db918f

Browse files
authored
[FEATURE] Introduce Fluid page title ViewHelper (#173)
References: TYPO3-Documentation/Changelog-To-Doc#1308 Releases: main
1 parent 21f6d84 commit 5db918f

File tree

1 file changed

+32
-4
lines changed

1 file changed

+32
-4
lines changed
Lines changed: 32 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,3 @@
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
51
:navigation-title: page.title
62

73
.. include:: /Includes.rst.txt
@@ -12,5 +8,37 @@
128
Page.title ViewHelper `<f:page.title>`
139
======================================
1410

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+
1537
.. typo3:viewhelper:: page.title
1638
: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

Comments
 (0)