[TYPO3-commerce] Feature #26795: Implement fluid as render engine for pi2

Christian Kuhn lolli at schwarzbu.ch
Fri May 13 02:18:35 CEST 2011


Issue: http://forge.typo3.org/issues/26795

Type: Feature

Problem:
Marker based templates are evil snafu from the last century.

Solution:
Switch pi2 to fluid based rendering.

Notes:
This is a *breaking change*:
- Current templates *will not work anymore*
- Hooks must be adapted to fit to current behavior

- I have tried to be as backwards compatible as possible with this 
change. Most hooks still exist and get similar information as before. 
Still, they must be adapted if markers are changed, since they now get 
arrays that should be manipulated.
- commerce introduces two new fluid view helpers, one enables us to 
comment a fluid template without producing html output at all, the other 
is a transposition of the moneylib extension behavior (which will render 
the dependency to ext:moneylib obsolete as soon as all pi's have been 
adapted to fluid).
- This change makes the options given to the view way more powerful. A 
lot of things can now be solved in fluid, which needed hooks before.
- Due to current code architecture of commerce, there is still room for 
improvements. This change tries to be as not intrusive as possible by 
not changing the code logic of the underlying classes, which would be 
too much at once. So, code is not optimal at some places yet. Those 
things can still be improved at a later point.
- HTML output of the new view compared to the old view is nearly 
identical (with default template), just minor things are adapted and 
most css classes are still valid.
- In numbers, this change reduces pi2 by lines of code to around 1/3 and 
it disentangles several ugly code constructs. That makes the pi2 call 
much better readable.

How to update:
If you are updating, you will have to go through the hard school of 
changing your current template to fluid. You will see that this will 
work out pretty well as soon as you are trained with this. Next step is 
beginning to love the flexibility of this engine and its ease of use. 
commerce actually gives you most information to render anything you like 
in fluid.

Hope you like this path
Christian
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 26795_01.diff
Type: text/x-patch
Size: 74913 bytes
Desc: not available
URL: <http://lists.typo3.org/pipermail/typo3-team-commerce/attachments/20110513/d7423578/attachment-0001.bin>


More information about the TYPO3-team-commerce mailing list