[TYPO3-core] Something nice

Kasper Skårhøj kasper2006 at typo3.com
Tue Apr 25 11:24:47 CEST 2006


Hi Bernhard,

I just put the core list in copy if you wish to continue (and  
introduce) the discussion there.

Here are a few statements:

Parent field:
- If you want to introduce a "parent" field so records can be  
children of other records, just like all records has "pid" field  
connecting it to a page: This I can only allow as long as the usual  
"pid" field is the authoritative pid and the "parent" field is just a  
standardized way to point out a field that is a parent pointer. Such  
a thing could be used to make the Web > List module able to display  
eg. a category table as a tree.
My main concerns are:
- Supporting that records inside of TYPO3 can avoid having a "pid"  
field and do with only a "parent" field pointing to a parent record  
from the same table is such a foundational change that affects  
everything down to rights management. I wouldn't touch it with a ten- 
foot pole (before we have maybe an object oriented structure that can  
make it a secure alternative).
- Supporting even an official "parent" field for such as a category  
table includes changes to eg. sys_refindex and integrity check  
routines. That is possible to accept.

"group" and "select" relation types:
- We have both comma-separated lists and MM-relations as options. The  
APIs generally take care of this transparently so the argument about  
usage in SQL is really not on the higher level but what you prefer  
underneath the hood.

"section" records:
  In my eyes the idea itself is independant of whether group and  
select relations are comma lists or MM relations and even the  
"parent" idea of yours does not affect it. The main idea of what you  
suggest is that the list of related records that is normally shown as  
a selector box could instead/additionally be shown as these records  
editable inside the main record. I think that is a fine idea. But  
please don't invent new relation types to do it - simply implement it  
for those we have!

- kasper





On Apr 24, 2006, at 17:13 , Bernhard Kraft wrote:

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Kasper Skårhøj wrote:
>
>> I don't mind if you work on this, I'm sure many people would like it.
>> However, its important that the records you edit inside the TCE forms
>> are referred to by a normal "group" or "select" field - that is how I
>> imagine that you do it; simply offer to render the "select" or   
>> "group"
>> field as real records...
>
> What we talk about here is a 1:n relation. One record (the main one  
> you choosed
> to edit) contains more (n) "section" records it refers to ....
> I think we should settle to call those records "section" record  
> when we talk - this term
> was already used for the synonym TV feature.
>
>
> You can create a n:m realations just when you have an extra table  
> defining the connections
> of two tables :
>
> Table A <-- n:m table --> Table B
>
> Now when you want to create a 1:n relation you can either do that  
> like it is "usual" in
> TYPO3 by having one field in Table A which contains some relations  
> to records in Table B:
>
> Table A (comma-list field "childs") --> Table B
>
> The problem here is that you have a comma separated values list and  
> you can in no way use
> that directly in SQL (i.e: Selcet all "connected" records of a  
> "main" record via a JOIN).
>
> To achieve this you would have to use the following structure
>
> Table A <-- (field "parent") TableB
>
> So rather a structure like the "pid" field of the pages table which  
> point's to it parent.
>
> The same as with the page's pid field those "parent" fields are  
> only allowed to hold ONE (!)
> reference to it's parent - so not more than one parent.
>
> The 'parent' field of course is a real TCA field which is of kind  
> "select" with a "foreign_table"
> property pointing to the main-table ... with "maxitems" and "size"  
> set to 1. The database type
> is "integer" (no need for lists :)
>
> It is in the opinion of the adminstrator/extension author who set's  
> up a site (the TCA) if he
> wan't to show the "parent" field inside the "section" records or not.
> Showing the field allows an Editor to "move/reassign" such a  
> section record from one main record
> to another.
> As "exclude" fields fully work with my solution you can also show  
> this field for one user and hide
> it for others .
>
>
>
> Final conclusion:
> I did not want to put anything into the TYPO3 core if you do not  
> want it - so this is why I asked you
> as this is not only a bug-fix but a completly new feature.
>
> I made an extension which works completly without XCLASSes and  
> makes this feature possible.
>
> I will publish the extension and check if people are interested in  
> it - if there is reasonable
> interest I will do some work to get a core-patch ready.
>
>
>
> greets,
> Bernhard
> - --
> -  
> ----------------------------------------------------------------------
> "Freiheit ist immer auch die Freiheit des Andersdenkenden"
> Rosa Luxemburg, 1871 - 1919
> -  
> ----------------------------------------------------------------------
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.1 (GNU/Linux)
> Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org
>
> iD8DBQFETOsbIl4dkVkDMFkRAv6YAJ9UM+zMX3vAtKRGcH36EmFtJWTU2gCeKOLQ
> HUpZoX+/MasTU4jlHSU5qsk=
> =3OR6
> -----END PGP SIGNATURE-----


- kasper

"A contribution a day keeps the fork away"
-------------------------------
kasper2006 at typo3.com | +45 20 999 115 | skype: kasperskaarhoej |  
gizmo: kasper_typo3





More information about the TYPO3-team-core mailing list