Reputation: 543
I have to implement a media download feature. The backend user should be able to upload a media file, set the title, description, release date and so on... The result should then be visible and the file available for download in the frontend.
I am not sure what is the best way to achieve this: Plugin or Custom content element ? Whats the main difference between the two and what would be the best solution for my task ?
Upvotes: 1
Views: 1012
Reputation: 2683
Plugins are used for more complex rendering of records with different views (for example a list and a detail view of records stored somewhere in a storage folder). A custom content element (CE) should be preferred if all relevant data is stored in the record.
For your case, a Content Element seems to be the right solution. This kind of custom content elements can also be easily created with helpful extensions like "mask" which may takes you 10 minutes to create a custom CE. https://typo3.org/extensions/repository/view/mask
Upvotes: 1
Reputation: 1
1) You can use the "File Link" content element and adapt its TypoScript (tt_content.uploads.20.renderObj
) to your needs.
2) You can use the file_list extension and adapt its Fluid templates to your needs
Upvotes: 0
Reputation: 156
If I understood you properly. You can define plugin as type of "list_type", or as "CType" (if you need to code specific function, which is hard or unable to achieve using eg. Fluid contents) or even as another menu type defined as "menu_type".
These all types can be the same way made plugin, this separation for types are basically only for making it appear in different selectors. So:
But they work the same way and this is easily to be switched using parameter in ext_tables plugin register call:
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPlugin( ['Label', $_EXTKEY.'_myPluginSuffix'], 'CType');
Upvotes: 1