TYPO3-related: change "Emmet" behaviour in Fluid autocomplete

In Fluid (the template engine of TYPO3), we type things like

<f:format.date>...

in HTML template files.
I am very much used to the autocomplete funtionality of Emmet and extect that, as when I type this:

f:format.date

it autocompletes to 

<f:format.date></f:format.date>

But instead the "." is interpreated as "class" attribute, so the result looks like this:

<f:format class="date"></f:format>

Is there any way to change that behaviour in such a HTML tempalte file, maybe by using/recognizing a special namespace (which Fluid uses)?

Thank you!

0
3 comments

Hi there,

I may only suggest to create a bunch of Live Templates with convenient abbreviations and use them. It's possible that somebody have created them already -- try googling them.

https://confluence.jetbrains.com/display/PhpStorm/Live+Templates+%28Snippets%29+in+PhpStorm

P.S. You may create Live Template with "f:format.date" as abbreviation .. but because of dot in it ... it will only work if you invoke "Complete Live Template" popup first (so the search is forced to be among live templates only)..

0
Avatar
Permanently deleted user

Thank you for your answer and insight!!! Very much appreciated!

 

The template collection grows...
Do you happen to know how I can get a template to print a pipe? I want a pipe in between span-tags, like this:

<span class="someClasses">|</span>$END$

 But if I use the abbreviation, the pipe is ommitted...

0

No idea why pipe is a problem here -- must be some parser related limitation or something (e.g. used for some stuff). If I add $ before pipe symbol it renders just fine (but with $ sign as well...)

 

In any case: Use variable and default value -- it will do well as workaround.

0

Please sign in to leave a comment.