[TYPO3-templavoila] RFC: Flexpointer handling in Typo3 Core classes (@Dmitry)

Martin Klaus klausm at in.tum.de
Tue Dec 5 06:27:50 CET 2006


Hi Dmitry,

> Martin Klaus wrote:
>> Some time ago, i've written the experimental Extension
>> (mk_tvfrontend) to enable working FE-Editing with Templavoila.
>> (wich works also with nested Flexforms and referenced CE's)
>> see: http://bugs.typo3.org/view.php?id=3191
>
> Good to know! FE editing for TV is one of painful things...
>
>> -> Let the frontend rendering know something abaut the concept
>> flexformPointer. At the moment the frontend can handle
>> records in the form :  <uid> and <table>_<uid>
>> so why not simply add <flexformPointerString> to describe a record?
>
> I think there is no any special reason, it simply was not done in typo3 
> core.

So we can call this as a gremlin ;) ?

>> I think this feature should not be enabled
>> by extension (x-classing) but should be added to TV and the frontend
>> core classes. (see detailed description below)
>
> There is one strict rule: core should not be depended on extensions. So we 
> cannot introduce knowledge about tv or dependency on tv into core. This 
> change will be banned. However we can use hooks! I am not sure what 
> technically must be done to access flexFormPointer but can it be done with 
> hooks? If yes, we can add a hook in core and tv can hook in and do 
> whatever it needs. If not, may be a concept of flexFormPointer can be 
> extended/moved to core.

Yes for sure, a back dependency to TV in core is a no go. I would prefer
the clean solution wich means to extend the core for the concept of
flexFormPointer (it would add an additional way to describe the reference to
a record in the core (extension cms) and doesn't break backwards 
compatibility).

---
Technically spoken: At the moment content rendering classes (tslib_content, 
...)
need the reference to a record in variant (a): "<content-uid>" or (b): 
"<content-table>_<content-uid>".
In the code there are some check's wich try to find out if the reference to 
the
content element is handled in form (a) or (b) and queries the database for 
the record based on this
information.

So why not simply add an reference description variant (c) to reference a 
content element using a
flexformPointer string:

("ds-table:ds-uid:sheet:sLang:field:vlang:position/content-table:content-uid" 
 )

To query the database you only need to extract the substring
"content-table" and "content-uid", they have the same meaning as in variant 
(b).

It's important that the flexPointer String has to be kept as reference to 
the content el.
during the renderening, because this information must be transfered to the 
frontend editing
classes.
---


If going the hook way there would probably be much more than one hook 
needed.
(tslib_content, loadDBGroup, ...)

> As to TS, I remember that we already have a hook to process custom content 
> objects. May be, it can be used in some way?

I know this hook and will have a look if this hook could help in some way
but i think not, because you would have to replace a lot of the existing
content element rendereng code either wich would be not much better than
the current x-classing (but then without blocking other extension that want 
to x-class
tslib_content ;-)

> In general I like the idea but I am not sure how to implement it all at 
> the moment: I am too far from that area of the code right now.

Nice to hear that my thoughts were not that wrong ;)

kindly regards,
Martin Klaus

> -- 
> Dmitry Dulepov
>
> Web: http://typo3bloke.net/
> Skype: callto:liels_bugs
>
> "It is our choices, that show what we truly are,
> far more than our abilities." (A.P.W.B.D.) 




More information about the TYPO3-project-templavoila mailing list