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

[FEATURE][PoC] Introduce way to skip fluid templates #552

Merged
merged 2 commits into from
Mar 1, 2023

Conversation

twoldanski
Copy link
Collaborator

resolves: #184

Feature if enabled replaces rendering templates in fluid in frontend context with php templates in order to simplify output json.

Templates paths resolving is the same as in fluid, feature seeks just files with php extension,

In php template you should just echo json_encode([...]);

How to enable:

  • add new headless.overrideFluidTemplates flag to LocalConfiguration
  • add to typoscript settings for desired plugin, flag phpTemplate=1 in order to override fluid templates

@coveralls
Copy link

coveralls commented Feb 16, 2023

Pull Request Test Coverage Report for Build 4305571388

  • 15 of 22 (68.18%) changed or added relevant lines in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.1%) to 61.597%

Changes Missing Coverage Covered Lines Changed/Added Lines %
Classes/XClass/TemplateView.php 15 22 68.18%
Totals Coverage Status
Change from base Build 4305237808: 0.1%
Covered Lines: 725
Relevant Lines: 1177

💛 - Coveralls

@lukaszuznanski lukaszuznanski added the enhancement New feature or request label Feb 17, 2023
resolves: #184

Feature if enabled replaces rendering templates in fluid in frontend context with php templates in order to simplify output json.

 Templates paths resolving is the same as in fluid, feature seeks just files with php extension,

 In php template you should just echo json_encode([...]);

How to enable:

- add new `headless.overrideFluidTemplates` flag to LocalConfiguration
- add to typoscript settings for desired plugin, flag `phpTemplate`=1 in order to override fluid templates
@twoldanski twoldanski changed the title [WIP][FEATURE][PoC] Introduce way to skip fluid templates [FEATURE][PoC] Introduce way to skip fluid templates Feb 20, 2023
@lukaszuznanski lukaszuznanski merged commit 1558076 into master Mar 1, 2023
@lukaszuznanski lukaszuznanski deleted the poc/php-json branch March 1, 2023 16:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Any way to ditch fluid?
3 participants