Skip to content

Components in non-HTML context #1183

@koehnlein

Description

@koehnlein

This is not necessarily a bug report. This is just a documentation of the mismatch between my expectations and the reality. Do whatever you want with this information.

What I found

I just tried to use the new components feature in a *.txt file. And I expected the component file EmailSignaturePlain/EmailSignaturePlain.txt with same file extension to be loaded.

My template file

{namespace c=My\Sitepackage\Components\ComponentCollection}<f:spaceless><f:render section="Title" optional="true" />
<f:render section="Main" /></f:spaceless>
<c:emailSignaturePlain />

The error message:

(1/3) #1407060572 TYPO3Fluid\Fluid\Core\Parser\Exception

Fluid parse error in template layout_SystemEmail_txt_ecc46b683b76185a, line 3 at character 2. Error: The ViewHelper "<c:emailSignaturePlain>" could not be resolved. Based on your spelling, the system would load the component template "EmailSignaturePlain/EmailSignaturePlain.html" in "/var/www/html/vendor/my/sitepackage/Resources/Private/Components/", however this file does not exist. (error code 1407060572). Template source chunk: <c:emailSignaturePlain />

What I would expect

Fluid should be able to find component files with the same file extension as the original template file.

To be honest, I do not know, how to handle components that are used in multiple formats (in *.html and *.txt template files) at the same time. Maybe a fallback chain to first try to find the specific one with the same file extension and *.html as fallback.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions