witrin
witrin

Reputation: 3763

Extbase storagePid with levelfield

I try to set the the storagePid of an extbase plugin by using levelfield like this:

plugin.tx_myext.persistence.storagePid = TEXT
plugin.tx_myext.persistence.storagePid.data= levelfield: -1, storage_pid, slide

Using the storage_pid of the current page is no problem:

plugin.tx_myext.persistence.storagePid = TEXT
plugin.tx_myext.persistence.storagePid.data= page:storage_pid

But I want to use levelfield to improve the usability of an extension. Thus you only would have to setup the storage_pid in the root page and include the default typoscript setup for the extension, which uses levelfield, into the root template...

Does anybody have a clue why levelfield is here not working?

Upvotes: 1

Views: 646

Answers (1)

Merec
Merec

Reputation: 2761

Not all fields can be used by default with levelfield. The fields that can be used on scratch are defined in $TYPO3_CONF_VARS["FE"]["addRootLineFields"]

To add another field simply add

$GLOBALS["TYPO3_CONF_VARS"]["FE"]["addRootLineFields"] .= ",storage_pid";

in typo3conf/ext_tables.php or in the ext_tables.php of your extension.

Upvotes: 1

Related Questions