[Typo3-dev] Access typo3-Input routines from backend module
Wolfgang Klinger
wolfgang at stufenlos.net
Mon Mar 15 12:52:45 CET 2004
Hi
On 11:37 Mon 15 Mar , Volker Biberger wrote:
> Problem is that I get an error when trying to add an entry:
> Attempt to insert record on page '[root-level]' (0) where this table,
> tx_skawacalendar_location, is not allowed
$this->id is set automatically to the current page if your module
is a "web" module, if not you'll have to set it to the uid of the
folder you'd like to store the records.
You can then check if the backend user is allowed to create records
in there with:
---
$this->pageinfo = t3lib_BEfunc::readPageAccess($this->id,$this->perms_clause);
$access = is_array($this->pageinfo) ? 1 : 0;
---
and you have to check that your records may be created in an ordinary
page in your ext_tables.php beforehand with:
---
t3lib_extMgm::addToInsertRecords ('my_ext');
t3lib_extMgm::allowTableOnStandardPages ('my_ext');
---
otherwise such records may only be created in a sysfolder....
(you can define this in the Kickstarter)
> Also the call t3lib_BEfunc::titleAttrib produces an error "Call to a
> member function on a non-object"
Hmm, you can add this at the top:
---
require_once (PATH_t3lib.'class.t3lib_befunc.php');
---
bye
Wolfgang
More information about the TYPO3-dev
mailing list