[TYPO3-templavoila] Future work on TemplaVoila
Jeff Segars
jsegars at alumni.rice.edu
Wed Nov 12 23:48:03 CET 2008
Dmitry Dulepov wrote:
> Hi!
>
> Jeff Segars wrote:
>> Most of it should just be dropping in a frontend editing controller that
>> we've already created (which could also live in its own extension if you
>> prefer), but there are a couple points where we'll need your expertise
>> if you're available. I'll run these by Steffen as well, since he's
>> interested in both projects.
>
> Can you provide some more technical details? :) If you have a
> document about it (like a specification), you can send it to me by
> e-mail.
>
Sure :) Here's the 2 minute overview....
Controller
==========
In the core, we now have a controller for frontend editing that
implements each action (new, edit, move, delete, etc). For TemplaVoila,
some of these actions are slightly different so it provides these
actions in its own controller
> protected function doMove($table, $uid) {
> $sourcePointerString = $GLOBALS['BE_USER']->frontendEdit->TSFE_EDIT['flexformPointer'];
> $destinationPointerString = $GLOBALS['BE_USER']->frontendEdit->TSFE_EDIT['destinationPointer'];
>
> $sourcePointer = $this->flexform_getPointerFromString($sourcePointerString);
> $destinationPointer = $this->flexform_getPointerFromString($destinationPointerString);
> $templaVoilaObj = $this->getTemplaVoilaObj($sourcePointer['table']);
> $result = $templaVoilaObj->moveElement($sourcePointer, $destinationPointer);
> }
vs.
Line 538 at
http://forge.typo3.org/repositories/entry/typo3v4-core/trunk/t3lib/class.t3lib_frontendedit.php?rev=4430
This is the part that should be the drop in solution without too much
required on your end.
There is one open question about how we determine whether to user the
default controller or the TemplaVoila controller since both may be used
in different sections of the pagetree.
Adding flexform pointer to edit panels
=======================================
In the snippet above, you'll also notice that we reference
TSFE_EDIT[flexformPointer]. When an individual edit panel for frontend
editing is rendered, we need to be able to embed the flexform pointer as
a hidden form field to uniquely identify that content element. The edit
panels are triggered through tslib_cObj, so the data array there seems
to be the best place to make the flexformPointer available.
We currently have a somewhat convoluted solution that inserts the
flexformPointer in pi->processDataValues() just before the cObject is
created. I'm curious what the right way to do this would be though :)
That's the quick overview of what we're doing. I can certainly provide
more details and code later on though.
Thanks!
Jeff
More information about the TYPO3-project-templavoila
mailing list