[Typo3-dev] How to let an extension create pages

Martin T. Kutschker Martin.T.Kutschker at blackbox.net
Thu Apr 1 09:21:11 CEST 2004


susanne mueller wrote:
> Dear list,
> 
> is it possible to let an extension create pages when it is installed by the extension manager.
> 
> In our extension-project we want the extension to create all the extension-related pages (subtree)
 > by itself in order not to oblige the admin-user having to do it by hand.

To create pages I use in the extension gsi_wizard_crform the following code

$tce = t3lib_div::makeInstance('t3lib_TCEmain');
$tce->start($data,array());
$tce->process_datamap();
t3lib_BEfunc::getSetUpdateSignal('updatePageTree');

The page and tt_content record are all in the $data array. You can 
create more than one page and it's content in one sweep. See the 
extensions for details.

I guess it's easier and cleaner that straight SQL.

But I don't know how to exectute PHP code at install time. And to be 
honest, I'm not sure if I want an extension to create pages during 
install. This would be rather unexpected.

Masi





More information about the TYPO3-dev mailing list