19/02 2012
Fluid tag auto-completion and validation

Want automatic tag argument insights, validation and immediate info about argument types? UPDATE: screen cast now included!

Dear developers,

Today brings excellent news. Especially if you already use an XSD-capable editor for your projects. Using the newly backported <link https: review.typo3.org external-link-new-window external link in new>Fluid ViewHelper XSD Generator I have created XSD schemas for all FED and Flux - and Fluid - ViewHelpers. If you download these XSD files and include them in your editor, you get automatic tag completion and argument validation.

Here is how:

First, download the files you need. These are:

  • <link http: fedext.net ns fluid viewhelpers.xsd external-link-new-window external link in new>The Fluid ViewHelper XSD
  • <link http: fedext.net ns fed viewhelpers.xsd external-link-new-window external link in new>The FED ViewHelper XSD
  • <link http: fedext.net ns flux viewhelpers.xsd external-link-new-window external link in new>The  Flux ViewHelper XSD

 

Note that these are saved using the same filename (ViewHelpers.xsd) to reflect the proper namespace in the URLs. You may want to rename or place the files in corresponding subfolders.

Second, register the XSD schemas in your editor with the appropriate namespaces:

Fluid ViewHelpers: namespace http://typo3.org/ns/fluid/ViewHelpers

FED ViewHelpers: namespace http://fedext.net/ns/fed/ViewHelpers

Flux ViewHelpers: namespace http://fedext.net/ns/flux/ViewHelpers

Lastly you now need to make your editor aware that these namespaces are used (and make the connection between VH namespace and XSD namespace - which means you can also register other names than, for example, "fed" for FED's ViewHelpers as long as you remember this in the mapping:

<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"
    xmlns:flux="http://fedext.net/ns/flux/ViewHelpers"
    xmlns:fed="http://fedext.net/ns/fed/ViewHelpers"
    xmlns:f="http://typo3.org/ns/fluid/ViewHelpers">

<f:section name="MySection">...</f:section>

</html>

Assuming you setup your editor correctly you will now be able to do validation of all arguments you use with FED, Flux and Fluid ViewHelpers. For example, your editor will now warn you about missing required arguments and make auto-completion lists when adding arguments.

UPDATE: I added a screen cast showing off how to both include XSD files and generate your own schemas for your own ViewHelper collections. <link internal-link internal link in current>Watch the video here.

Happy Fluiding :)

 

Archive

09/01 2017
09/11 2016
09/06 2016
21/12 2015
07/12 2015
25/11 2015
25/09 2015
22/09 2015
01/08 2015
10/03 2015
03/03 2015
12/02 2015
25/11 2014
01/11 2014
16/10 2014
02/10 2014
02/10 2014
19/09 2014
18/09 2014
05/09 2014
22/08 2014
02/08 2014
27/06 2014
06/06 2014
13/04 2014
27/03 2014
12/03 2014
11/03 2014
05/02 2014
25/01 2014
17/12 2013
08/12 2013
03/12 2013
04/11 2013
Flux 7.0 Teaser
06/08 2013
21/07 2013
10/06 2013
04/06 2013
01/06 2013
27/05 2013
19/05 2013
19/05 2013
11/05 2013
26/04 2013
30/03 2013
19/03 2013
17/03 2013
13/03 2013
10/03 2013
10/03 2013
05/03 2013
04/03 2013
03/03 2013
02/03 2013
01/03 2013
28/02 2013
27/02 2013
25/02 2013
24/02 2013
24/02 2013
23/02 2013
10/02 2013
03/02 2013
03/02 2013
27/01 2013
Asset management in Fluid
20/01 2013
16/01 2013
13/01 2013
08/01 2013
16/12 2012
25/11 2012
18/11 2012
08/11 2012
07/11 2012
05/11 2012
04/11 2012
28/10 2012
22/10 2012
14/10 2012
13/08 2012
08/08 2012
31/07 2012
30/07 2012
25/07 2012
29/04 2012
29/04 2012
22/04 2012
16/04 2012
21/03 2012
Flux 1.4.0 released
08/03 2012
Flux 1.3.0 released
04/03 2012
03/03 2012
28/02 2012
19/02 2012
A Sneaky Sneak Preview of the next version of Flux
13/02 2012
12/02 2012
06/02 2012
30/01 2012
27/01 2012
15/01 2012
26/12 2011
24/12 2011
11/12 2011
11/12 2011
10/12 2011
04/12 2011
04/12 2011
30/11 2011
26/11 2011
25/11 2011