As a TYPO3 extension developer, you might already use PhpStorm as your IDE, it gives you so many benefits in your PHP coding. You probably love the auto completion, syntax highlighting and keyboard shortcuts. One missing bit is that Storm by default does not understand the Fluid template engine syntax and paints lots of red marks to your code. But thankfully, the designers of Fluid made the template engine compatible to XML standards, so it is possible to enable PhpStorm understand the bits and pieces of this.
This howto is about getting PhpStorm understand and autocomplete your fluid code.
Thanks to the a schemagenerator by Claus Due (@NamelessCoder), there is an easy way. On his website http://www.fedext.net you can download the xsd schema files for the TYPO3 system extension fluid, as well as for his own collection of extensions. As a bonus you can create the schema for your own viewhelpers.
<div xmlns="http://www.w3.org/1999/xhtml" lang="en"
xmlns:f="http://typo3.org/ns/fluid/ViewHelpers" >
<f:layout name="Default" />
<f:section name="main" >
// your fluid code is here
</f:section>
<?xml version="1.0" encoding="UTF-8" ?>
<html xmlns="http://www.w3.org/1999/xhtml" lang="en"
xmlns:f="http://typo3.org/ns/fluid/ViewHelpers">
<head>
<title>Partials: ValidationResults</title>
</head>
<body>
<f:section name="Main">
// your fluid code is here
</f:section>
</body>
Enjoy increased coding speed and decreased typos in your TYPO3 Fluid Views ;)
Another way to ease making this setting for multiple projects is to export it once and import it into further projects - that saves a few clicks.