Usability: Remove "Save and View" when creating records in sysfolders
When creating a record in a sysfolder, the "Save and VIew" button is still displayed, although it doesn't have any reasonable functionality.
See http://bugs.typo3.org/view.php?id=9663 for a related issue in DAM.
(issue imported from #M10706)
[FEATURE] Hide "save and view" button where not useful
Per default the save&view button is not rendered anymore for the doktypes
254, 255 and 199. This behaviour can be changed by TSConfig.
Reviewed-by: Anja Leichsenring <email@example.com>
Tested-by: Anja Leichsenring <firstname.lastname@example.org>
Reviewed-by: Andreas Wolf <email@example.com>
Tested-by: Andreas Wolf <firstname.lastname@example.org>
#1 Updated by Michael Klapper over 9 years ago
I attached a new version for that patch (10706_v2.diff). It provides the option to enable the "save & view" button for records if this is explicit desired.
This patch works as follow (example use tt_news):
- If nothing is set save&view button is hide.
- If "options.saveDocView.tt_news = 0", save & view button is still hidden.
- If "options.saveDocView.tt_news = 1" save & view button is available.
I woul like to see that version of patch in the core because i added some functionality to the ext linkhandler which enables a preview to records where an linkhandler configuration is available.
#3 Updated by Ernesto Baschny over 6 years ago
I like the approach of #23085, which is the most flexible one, but could get some more fine-tuning and enhancements:
- Default Core behaviour should be "no links" generated for sys_folders and recycler folder.
- Configurable PID and additional parameters on a "per table" basis configurable through PageTS (to make it easy for integrators).
- PHP hook to be able to customize the generated link even further (like in #23085).
- Hook should also be able to "withdraw" the link altogether (so that the icon is then not shown at all).
Something like that. :)
#4 Updated by Tim Lochmüller about 6 years ago
I check all (how many issues for just one function ;) ) tickets and create a feature-patch for the current 6.2 master.
Before I push the patch to the master, I hope I get a short feedback!
I respect Ernestos wishes:
- In the "default" no SaveAndView Button is renderd in the doctpyes: 254, 255 (configurable)
- Configuration of the target PID and also additionalParams for the previewLink vi TSConfig (the replacement of the ###UID### isn't realy smart. Any suggestions?)
common.table.tt_news.FePreviewPid = 101
common.table.tt_news.additionalParams = &test=###UID###
- central getHookObjects method for the EditCommandController incl. cache of the creation of the hook objects via internal static variable
- hook for the "processPreviewLink" to change the link via PHP
- hook for the "manipulateButtons" to remove/add buttons manually.
Any feedback and improvements?
If this is the right direction, I would add a new feature issue for the 6.2 master and push the changes to the Gerrit.