I am trying to activate the new frontend editing (ext:frontend_editing) for news records (ext:news). The editing part is working well, but I am failing to add new news records in the frontend.
I am following the steps in the manual and the "custom records" part appears, but what now? Can someone describe what values I need to pass to the method wrapContentWithDropzone(), which is described in the manual?
/**
* @param string $content Empty string (no content to process)
* @param array $conf TypoScript configuration
* @return string $content
*/
public function wrapWithDropZone($content, $conf)
{
if (GeneralUtility::_GET('frontend_editing') && GeneralUtility::makeInstance(AccessService::class)->isEnabled()) {
$wrapperService = GeneralUtility::makeInstance(ContentEditableWrapperService::class);
$content = $wrapperService->wrapContentWithDropzone(
'tt_content', // table name
0, // page uid, pid
$content,
0 // colPos
);
}
return $content;
}
Appreciate any help or push into the right direction! Thanks!
UPDATE
I realized, that the code above adds a drop zone at the very bottom of a page. But this drop zone only reacts on "normal" content elements, but not on my newly added custom element. When I change the first value of the method "wrapContentWithDropzone()" to "tx_news_domain_model_news", this drop zone will create a new news record, regardless which element was dropped...
So I am still looking for a way, to activate the custom record in order to add new news records preferably on a storage folder.