[TYPO3-mvc] Allow StoragePid to be set in backend modules
Patrick Broens
patrick at netcreators.com
Tue Oct 26 14:34:18 CEST 2010
Hi,
This is a feature request.
Backend modules can use the main module 'web' which also offers the page
tree. In this page tree there can be multiple storage folders for
objects of this module, for instance with different domains/websites.
Secondly a backend user can have restricted access to certain pages or
sysfolders.
With the current TS implementation of the storagePid and the
newRecordStoragePid for new objects there is no way to influence these
in a backend module. It does not care about the page which has been
chosen in the page tree in a backend module.
For reading objects, you can manipulate this by reading the pid of the
selected page, use SetRespectStoragePage(FALSE) and make a query using
$query->equals('pid', $pid)
But when storing objects, this will always be the newRecordStoragePid,
regardless on what page you are in the module.
There is also another scenario where this is needed. When using Ajax in
the backend reading or writing objects to repositories, the called
controller does not know on which page it resides or from which page to
get the objects or where to store them. Normally you can use a
javascript pid variable which is used in the Ajax URL. Again, this is
still possible with reading, but not with writing objects.
It would be very conventient to have the possibility to set the
storagePid and newRecordStoragePid in the backend for each repository
individually depending on a pageId which could be a post or get
variable, so not using TS. This opens a lot of possibilities with
backend modules in combination with Extbase.
In short: An Extbase BE module using the page tree is not capable of
storing objects in the selected page of that tree, which reduces the
possibilities of the BE.
This is not possible with Extbase or am I overlooking something?
Cheers
Patrick
More information about the TYPO3-project-typo3v4mvc
mailing list