Skip to content

maxfrerichs/typo3-plates

Repository files navigation

TYPO3 Plates integration

Integration of the Plates template engine into TYPO3.

What is Plates?

Plates is a native template system for PHP. It's fast, easy to use and you don't have to learn any new syntax. Sounds great, right?

About this extension

Tired of using Fluid (even if it's great)? You don't even know what Fluid is? You're too lazy to learn it? You like to try out new stuff, just like me? I've got you covered!

This extension that allows you to use the Plates inside TYPO3 (almost, I swear) the same way as you can work with Fluid inside TYPO3.

How to try out

  1. I assume you have a working TYPO3 installation and composer installed and know how stuff works. Proper documentation will follow, but for now, you're on your own.
  2. Install this extension (just download the source code and put it into packages/ of your favorite TYPO3 project)
  3. Assign the PLATESTEMPLATE to an existing page object, like this:
page = PAGE
page.10 = PLATESTEMPLATE
page.10.templateRootPath = EXT:sitepackage/Resources/Private/Templates/
  1. Create a template file in your configured path (EXT:sitepackage/Resources/Private/Templates/) called default.php and put some code in there. You can also provide a custom name with the templateName option. If no name is set, there is a fallback to "default".
    <p>Hello, <?=$this->e($data['title'])?></p>

This will put out the page title in the frontend. Of course, you can use any PHP code you want, including loops, conditions etc. Just refer to Plates Documentation for more information. 4. Open the page in your browser and look at the result. You should see the page title in a paragraph tag.

What works

What does not work

  • Caching. While Plates itself does not cache stuff, TYPO3 does. Maybe this can be refined
  • Every Plates-specific feature other than basic rendering.

What needs to be done before releasing

  • Testing
  • More testing
  • Even more testing
  • Documentation. A lot of documentation.
  • Building some kind of CI/CD pipeline for testing, linting, rendering documentation and releasing

Project goals

Providing a simple, but flexible and easy to use template alternative to Fluid that simplifies stuff for new integrators, but also looks not too unfamiliar to those who are used to working with Fluid. Also, integration of well-known concepts like DataProcessor And last but not least: fun and learning new stuff about TYPO3

Contribution

Just open an issue and I will respond. If you want to contribute, just fork this repository and create a pull request. I will review your contribution and give you feedback.

Disclaimer

This extension is currently a proof-of-concept and is not meant to be used in production. It is not feature-complete. It is not tested. It is not secure. Use it at your own risk.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages