[TYPO3-english] external_import, nesting pages
François Suter
fsu-lists at cobweb.ch
Fri Jan 30 13:36:40 CET 2015
Hi David,
> In this userfunction i check for currently existing pages which
> "tx_vtmmage_magento_category_id" == "the current external parent_id". If
> there is a result, the uid of this page will be returned and should be
> used as pid for the new record.
>
> Unfortunately this pid gets overridden while importing and all new
> records gets defined 'pid' => 97" from the ctrl section.
Have you checked that your function works as expected? Normally
external_import will not override the "pid" field if it already contains
a value, so my guess is that your function returns nothing.
BTW have you tried simply mapping the pid field to the pages table
itself, i.e. something like:
$GLOBALS['TCA']['pages']['columns']['pid']['external'] = array(
0 => array(
'field' => 'parent_id',
'mapping' => array(
'table' => 'pages',
'reference_field' => 'tx_vtmmage_magento_category_id'
)
)
);
This should normally work.
HTH
--
Francois Suter
Work: Cobweb Development Sarl - http://www.cobweb.ch
TYPO3: Help the project! - http://typo3.org/contribute/
Appreciate my work? Support me -
http://www.monpetitcoin.com/en/francois/support-me/
More information about the TYPO3-english
mailing list