Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fluid Standalone example not working #1023

Closed
froemken opened this issue Jan 4, 2025 · 1 comment
Closed

Fluid Standalone example not working #1023

froemken opened this issue Jan 4, 2025 · 1 comment

Comments

@froemken
Copy link
Contributor

froemken commented Jan 4, 2025

Hello,

I just try to code a fluid standalone, but I don't get it to work. The TemplateView seems to expect a RenderingContext, but example transfers a TemplatePath object which is not allowed.

This example should be updated. Thank you:
https://docs.typo3.org/other/typo3fluid/fluid/main/en-us/Usage/Structure.html#the-api

Stefan

@s2b
Copy link
Contributor

s2b commented Jan 16, 2025

Hi Stefan,
thank you for this report. I'm currently in the last steps of restructuring the whole documentation and fixed the example code in this version.

833bcfd

Working example:

// Create your view
$view = new \TYPO3Fluid\Fluid\View\TemplateView();
// set up paths object with arrays of paths with files
$paths = $view->getRenderingContext()->getTemplatePaths();
$paths->setTemplateRootPaths(['/path/to/templates/']);
$paths->setLayoutRootPaths(['/path/to/layouts/']);
$paths->setPartialRootPaths(['/path/to/partials/']);

@s2b s2b closed this as completed Jan 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants