[TYPO3-english] Extending TYPO3 Copy-Paste ability

Sancar Saran sancar.saran at evodot.com
Fri Oct 16 15:30:43 CEST 2009


On Friday 16 October 2009 04:03:56 pm Bernhard Kraft wrote:
> Sancar Saran schrieb:
> > Recently one of our customers wants to multi domain setup on his TYPO3
> > setup. After some check we find, we have to extend copy - paste ability
> > of TYPO3. Our custom page design system have own page setup data on
> > seperated db table.
> >
> > So we need to add some lines into copy paste system to copy our db
> > records too.
> >
> > How can we do this ? Where should I put my code in TYPO3 lib ?
> 
> Best solution would be, to integrate your records into the TYPO3
> database system, which in fact means you would have to write a TCA
> definition for it. You can read about "TCA" (=Table Configuration Array)
> here:
> 
> http://typo3.org/documentation/document-library/core-documentation/doc_core
> _api/4.2.0/view/4/1/
> 
> Mostly all your own custom tables need to be TYPO3 compatible are fields
> named "uid/pid" for storing an unique ID for each record, and the pid
> field for storing the page the records can be found on.
> 
> Then just creat a TCA in typo3conf/extTables.php, or your own extension.
> Almost any extension adding a table has a "tca.php", have a look at them
> do understand how they work.
> 
> If you then place your records on some page, and copy them, TYPO3 will
> take care to also copy them over to the new page.
> 
> 
> As an alternative, you could use a hook in t3lib/class.t3lib_tcemain.php
> to take required steps whenever you copy a record. You can read about
> hooks here:
> 
> http://typo3.org/documentation/document-library/core-documentation/doc_core
> _api/4.2.0/view/3/4/
> 
> 
> greets,
> Bernhard
> _______________________________________________
> TYPO3-english mailing list
> TYPO3-english at lists.netfielders.de
> http://lists.netfielders.de/cgi-bin/mailman/listinfo/typo3-english
> 
Hello Bernhard,

Thanks for reply. 

And it wasn't work like that. 

We had tca for our data and our data does not related or altered from TYPO3 
backend. 

Our system someting like frontend editing, its adds another data layer for 
generating page structure and adding plugins/html content  and stores data in 
different db table.

My table structure like

page_id.location_key, language, content.

Each record related with a page id and custom location.

when we copy entire site structure, our records have to copied too

and in copy stage 

page_id of page_id.location_key have to replaced with new page id.

Regards.

Sancar


More information about the TYPO3-english mailing list