Contribution
Contributions to this manual are made by editing the ViewHelper's page in the TYPO3CMS-Reference-ViewHelper repository — the usual Edit on GitHub workflow works as it does in every other official TYPO3 manual. Use the Edit on GitHub button on the page you want to change.
Which parts of a page are generated
Every ViewHelper page mixes two kinds of content:
- Generated
- The description, flags such as deprecated or internal, and the table
of arguments all come from the ViewHelper's PHP class. The
typo3:directive reads them fromviewhelper Documentation/and the other JSON files each time the manual is rendered. The Fluid ViewHelper Documentation Generator keeps those files current, running once a day. A change to a doc-comment or to an argument therefore appears on the page without anyone editing it.Global. json - Written by hand
- Everything else: the explanations, the examples and the structure of the page. This is what you contribute.
Pages are only ever added, never rewritten:
- A ViewHelper that has no page yet gets one from the generator — once.
- An existing page is never overwritten, so hand-written text is safe.
- When a ViewHelper is removed from the TYPO3 Core, its page is left behind and has to be deleted by hand.
Hand-written documentation is preferred
Extended examples belong on the page in this manual, not in the PHP doc-comment. A doc-comment should stay a short description of what the ViewHelper does. Longer explanations, several usage examples and their rendered output are easier to read and to maintain in the manual, where they can use the full reST markup, tabs and literal includes.
Recommended page structure
See Documentation/ for a page that follows
this structure:
- A
:navigation-and an anchor, followed by the page title.title: -
The
typo3:directive showing the description and flags:viewhelper .. typo3:viewhelper:: form.checkbox :source: ../../Global.json :display: tags,description,gitHubLink :noindex:Copied! - A
.. contents::menu, when the page is long enough to need one. - The hand-written sections — what the ViewHelper is for, the common cases, and examples. Give every headline its own anchor.
-
An "Arguments" section at the end, listing the arguments from the same source:
.. typo3:viewhelper:: form.checkbox :source: ../../Global.json :display: arguments-onlyCopied!
Editing the ViewHelper source
Editing the PHP doc-comment is the right fix when the short description itself is wrong or missing, since that text is shown on the page and in IDEs. The ViewHelper classes live at
- https://github.com/TYPO3/typo3/tree/main/typo3/sysext/core/Classes/ViewHelpers
- https://github.com/TYPO3/typo3/tree/main/typo3/sysext/backend/Classes/ViewHelpers
- https://github.com/TYPO3/typo3/tree/main/typo3/sysext/fluid/Classes/ViewHelpers
- https://github.com/TYPO3/Fluid/tree/main/src/ViewHelpers
Such a change reaches this manual with the next run of the generator, which happens once a day. See Fluid ViewHelper reference generation for how the whole process fits together.
You can use the common directives of the reST markup language supported by the TYPO3 documentation rendering toolchain.