Conversation
| .. code-block:: php | ||
| :caption: EXT:my_extension/Configuration/Fluid/ComponentCollections.php | ||
|
|
||
| <?php |
There was a problem hiding this comment.
Can we put this into a separate file? This way, the file is automatically formatted.
|
|
||
| All arguments that are passed to a component need to be defined with | ||
| :html:`<f:argument>` in the component template, for example | ||
| :file:`Navigation.fluid.html`. |
There was a problem hiding this comment.
You mention "Navigation.fluid.html", but is there an example available where someone can see the <f:argument>s?
|
|
||
| <?php | ||
|
|
||
| return [ |
There was a problem hiding this comment.
Please use a full example so it is clear where to put this snippet.
| that it defines all of its arguments with the | ||
| `Argument ViewHelper <f:argument> <https://docs.typo3.org/permalink/t3viewhelper:typo3fluid-fluid-argument>`_. | ||
| The `Slot ViewHelper <f:slot> <https://docs.typo3.org/permalink/t3viewhelper:typo3fluid-fluid-slot>`_ | ||
| can be used to receive other HTML content. With the Slot ViewHelper it is possible to nest components. |
There was a problem hiding this comment.
Please link "Slot ViewHelper" to the Fluid VH docs.
There was a problem hiding this comment.
Just before this line it is linked. :)
| Migration and co-existence with class-based collections | ||
| ------------------------------------------------------- | ||
|
|
||
| Since TYPO3 v14 you should use the configuration-based component collections over |
There was a problem hiding this comment.
I suggest to first create a PR for v13 and main. When this is merged/backported (and all work done for v13), then the v14 part should be worked on which is then merged only to main.
Otherwise you end up with documentation for v14 in v13 docs - which is not really ideal.
There was a problem hiding this comment.
I'd argue that Fluid Components shouldn't really be documented for TYPO3 v13. The fact that they could be used in v13 was kind of a hack, now official support is added with v14, which is when this should be documented in the TYPO3 documentation.
Nevertheless, if you come from v13, there should be a place that shows how to migrate the old implementation to the new one.
There was a problem hiding this comment.
Okay, fine for me. As a "Releases" line is lacking, it was not obvious for which branches the PR is meant.
Co-authored-by: Chris Müller <2566282+brotkrueml@users.noreply.github.com>
Co-authored-by: Chris Müller <2566282+brotkrueml@users.noreply.github.com>
Co-authored-by: Chris Müller <2566282+brotkrueml@users.noreply.github.com>
Co-authored-by: Chris Müller <2566282+brotkrueml@users.noreply.github.com>
sarahmccarthy123
left a comment
There was a problem hiding this comment.
Looks good:-) Just a a few language suggestions
| Description | ||
| ----------- | ||
|
|
||
| With version 4.3 the concept of components was introduced into Fluid. |
There was a problem hiding this comment.
Maybe this needs a ".. versionadded:: 14.3" instead of a description?
There was a problem hiding this comment.
It is about Fluid, I think it is sufficient to just mention it in the text.
| Registering component collections | ||
| --------------------------------- | ||
|
|
||
| In order to use Fluid components register a component collection |
There was a problem hiding this comment.
| In order to use Fluid components register a component collection | |
| In order to use Fluid components, register a component collection |
| ], | ||
| ]; | ||
|
|
||
| in which you define the path your Fluid components can be found. |
There was a problem hiding this comment.
| in which you define the path your Fluid components can be found. | |
| in which you define the path where your Fluid components can be found. |
| ]; | ||
|
|
||
| in which you define the path your Fluid components can be found. | ||
| Components in that collections can then be used in any Fluid template. |
There was a problem hiding this comment.
| Components in that collections can then be used in any Fluid template. | |
| Components in these collections can then be used in any Fluid template. |
|
|
||
| <my:organism.header.navigation /> | ||
|
|
||
| Note that by default, component collections use a folder structure that |
There was a problem hiding this comment.
| Note that by default, component collections use a folder structure that | |
| Note that, by default, component collections use a folder structure that |
| The `Slot ViewHelper <f:slot> <https://docs.typo3.org/permalink/t3viewhelper:typo3fluid-fluid-slot>`_ | ||
| can be used to receive other HTML content. With the Slot ViewHelper it is possible to nest components. | ||
|
|
||
| Example: How you could define a Fluid component |
There was a problem hiding this comment.
| Example: How you could define a Fluid component | |
| Here is an example of how you could define a Fluid component: |
|
|
||
| You can learn more about components in | ||
| `Defining Components <https://docs.typo3.org/permalink/fluid:components-definition>`_. Note | ||
| that this is part of the documentation of Fluid Standalone, which means that it doesn't mention |
There was a problem hiding this comment.
| that this is part of the documentation of Fluid Standalone, which means that it doesn't mention | |
| that this is part of the Fluid Standalone documentation, which means that it doesn't mention |
| In TYPO3 v13 it is possible to use components in TYPO3 projects by creating a custom | ||
| :php:`ComponentCollection` class that essentially connects a folder of template files | ||
| to a Fluid ViewHelper namespace. Using that class it is also possible to use an | ||
| alternative folder structure for a component collection and to allow passing |
There was a problem hiding this comment.
| alternative folder structure for a component collection and to allow passing | |
| alternative folder structure for a component collection and to allow |
| :php:`ComponentCollection` class that essentially connects a folder of template files | ||
| to a Fluid ViewHelper namespace. Using that class it is also possible to use an | ||
| alternative folder structure for a component collection and to allow passing | ||
| arbitrary arguments to components within that collection. |
There was a problem hiding this comment.
| arbitrary arguments to components within that collection. | |
| arbitrary arguments to be passed to components in that collection. |
| a component collection. Since the configuration-based approach is not available in TYPO3 v13, | ||
| it is possible to ship both variants to provide backwards-compatibility: | ||
| if a specific component collection is | ||
| defined both via class and via configuration, in TYPO3 v13 the class will be used, |
There was a problem hiding this comment.
| defined both via class and via configuration, in TYPO3 v13 the class will be used, | |
| defined both by class and by configuration, in TYPO3 v13 the class will be used, |
This pr adds all new Fluid events needed as code snippets in the documentation. Releases: main
This commits should provide an introduction to usage of the Fluid components. In the next patch I will include the PSR-14 events and the file Namespaces.php.
I had to remove the PSR events, because otherwise the patch would be too big. I decided to separate them into smaller parts. I added the new changes from the main branch that come into it during the time of preparing the pr.