Discussion:
[Typo3] Adding new field in tt_content
Papis
2005-12-05 10:08:18 UTC
Permalink
Hi All,
I just want to add a new field in tt_content in backend (in the file file link)
This field must be filled with records from a nother table "user_famille"
so i see in typo3 core API and i add in the php file tbl_tt_content.php this
*************************************************************
'uid_famille' => Array (
'exclude' => 1,
'label' => 'Famille ',
'config' => Array (
'type' => 'select',
'items' => Array (
Array('', 0),
),
'foreign_table' => 'user_famille',

)
),
And
$TCA['tt_content'] = Array (
'ctrl' => $TCA['tt_content']['ctrl'],
'interface' => Array (
'always_description' => 0,
'showRecordFieldList' => 'CType,header,header_link,bodytext,image,imagewidth,imageorient,media,records,colPos,starttime,endtime,fe_group,author,author_email,keywords,abstract,client,uid_famille'
),
And at last
'uploads' => Array('showitem' => 'CType;;;button;1-1-1,

media;;;;5-5-5,
filelink_size,
date_creation_fichier,
author,
author_email,
client;;;;5-5-5,
uid_famille,
type_document,
abstract;;9;richtext[*]:rte_transform[flag=rte_enabled|mode=ts];3-3-3, text_properties,
keywords
'),
But my probleme is i dont see where to precise what column to select in user_famille table.
In Typo3 Cor Apis they say:
foreign_table:(tablename) The item-array will be filled with records from the table defined here. The table must be configured in $TCA. See the other related options below.
I notice that while processing the backend form for file link typo3 make a defaulf join between my table (user_famille) and page table on pid. ???
Thanks in advance, Any help is welcome




Alioune Seck
Ing?nieur en Informatique
Tel: (+221) 516 97 77




---------------------------------
Appel audio GRATUIT partout dans le monde avec le nouveau Yahoo! Messenger
T?l?chargez le ici !
Dmitry Dulepov
2005-12-05 10:37:27 UTC
Permalink
Hi!
Post by Papis
I just want to add a new field in tt_content in backend (in the file file link)
This field must be filled with records from a nother table "user_famille"
Use extension "kickstarter" to extend this table. It will generate
everything you need.

Dmitry.
Papis
2005-12-05 10:58:13 UTC
Permalink
Thanks a lot,
Cant not see value in kickstarter if i edit TYPO3 CMS Frontend (TypoScript)
extension and then if i use kickstarter i will be oblige to make a news extension.
I Just want to modifier the backend form for tt_content, dont know if it is possible?
Thanks


Dmitry Dulepov <typo3 at fm-world.ru> a ?crit : Hi!
Post by Papis
I just want to add a new field in tt_content in backend (in the file file link)
This field must be filled with records from a nother table "user_famille"
Use extension "kickstarter" to extend this table. It will generate
everything you need.

Dmitry.
_______________________________________________
Typo3-english mailing list
Typo3-english at lists.netfielders.de
http://lists.netfielders.de/cgi-bin/mailman/listinfo/typo3-english




Alioune Seck
Ing?nieur en Informatique
Tel: (+221) 516 97 77




---------------------------------
Appel audio GRATUIT partout dans le monde avec le nouveau Yahoo! Messenger
T?l?chargez le ici !
Dmitry Dulepov
2005-12-05 14:06:40 UTC
Permalink
Hi!
Post by Papis
Cant not see value in kickstarter if i edit TYPO3 CMS Frontend (TypoScript)
extension and then if i use kickstarter i will be oblige to make a news extension.
I Just want to modifier the backend form for tt_content, dont know if it is possible?
You need to change $TCA for it and add columns. Extension is the best,
easiest and official way to go. You need not to do "Frontend plugin" for
it (pi1), just "Generic frontend" will do. Extension will ensure that
table is updated properly.

Dmitry.
Papis
2005-12-07 13:28:12 UTC
Permalink
Hi All,
thank Dmtry,
I get the point to how of how to use kickstater to make extension.
But my new problem is how can I do to stop typo making automatic join between page table and my added table.
I explain if i insert a values in my foreign table without any related pid (or pid =0) , I do not see this values in the select box in the backend page.
I realise that typo does an automatic join on page id, or i want to displays the same values in the select box despite were I'am (on page)
Thanks a lot

Dmitry Dulepov <typo3 at fm-world.ru> a ?crit : Hi!
Post by Papis
Cant not see value in kickstarter if i edit TYPO3 CMS Frontend (TypoScript)
extension and then if i use kickstarter i will be oblige to make a news extension.
I Just want to modifier the backend form for tt_content, dont know if it is possible?
You need to change $TCA for it and add columns. Extension is the best,
easiest and official way to go. You need not to do "Frontend plugin" for
it (pi1), just "Generic frontend" will do. Extension will ensure that
table is updated properly.

Dmitry.
_______________________________________________
Typo3-english mailing list
Typo3-english at lists.netfielders.de
http://lists.netfielders.de/cgi-bin/mailman/listinfo/typo3-english




Alioune Seck
Ing?nieur en Informatique
Tel: (+221) 516 97 77




---------------------------------
Appel audio GRATUIT partout dans le monde avec le nouveau Yahoo! Messenger
T?l?chargez le ici !
Dmitry Dulepov
2005-12-07 13:44:35 UTC
Permalink
Hi!
Post by Papis
I get the point to how of how to use kickstater to make extension.
But my new problem is how can I do to stop typo making automatic join between page table and my added table.
I explain if i insert a values in my foreign table without any related pid (or pid =0) , I do not see this values in the select box in the backend page.
I realise that typo does an automatic join on page id, or i want to displays the same values in the select box despite were I'am (on page)
Look for itemsProcFunc for type=select. It allows you to generate your
own set of choices.

Dmitry.
Papis
2005-12-12 16:37:37 UTC
Permalink
Thank you very mutch Dmitry,
I all is working when i use Kicstartet et itemsProcFunc you were wright it is more clean code :)
But i want to know how can i gerate depandant select box in backend?
SOS
Any help is welcom


Dmitry Dulepov <typo3 at fm-world.ru> a ?crit : Hi!
Post by Papis
I get the point to how of how to use kickstater to make extension.
But my new problem is how can I do to stop typo making automatic join between page table and my added table.
I explain if i insert a values in my foreign table without any related pid (or pid =0) , I do not see this values in the select box in the backend page.
I realise that typo does an automatic join on page id, or i want to displays the same values in the select box despite were I'am (on page)
Look for itemsProcFunc for type=select. It allows you to generate your
own set of choices.

Dmitry.
_______________________________________________
Typo3-english mailing list
Typo3-english at lists.netfielders.de
http://lists.netfielders.de/cgi-bin/mailman/listinfo/typo3-english




Alioune Seck
Ing?nieur en Informatique
Tel: (+221) 516 97 77




---------------------------------
Appel audio GRATUIT partout dans le monde avec le nouveau Yahoo! Messenger
T?l?chargez le ici !

Continue reading on narkive:
Loading...