Feature #18595
closedApply link wizard for folder selection to tt_content, CType uploads
0%
Description
This feature (see attached patch) depends on #16942 (will be in 4.2) and the corresponding bugfix #16942
It enhances the select_key field of tt_content with a wizard that should allow a less difficult folder selection (used for the "read from path"-feature) - by having a wizard added to the select_key field if CType is uploads.
(issue imported from #M8072)
Files
Updated by Kay Strobach over 12 years ago
- Target version changed from 0 to 6.0.0
this is an important usability improvement, which should have been fixed in 4.2 already :)
Updated by Kay Strobach over 12 years ago
Unclean solution, but working (is not respecting CType)
t3lib_div::loadTCA('tt_content'); $TCA['tt_content']['columns']['select_key']['config']['wizards']['tx_wizards_uploads_path'] = array( 'type' => 'popup', 'enableByTypeConfig' => 0, 'title' => 'Link', 'icon' => 'link_popup.gif', 'script' => 'browse_links.php?mode=wizard&act=folder', 'JSopenParams' => 'height=300,width=500,status=0,menubar=0,scrollbars=1', 'params' => array ( 'blindLinkOptions' => 'page,mail,url,file' ) );
Theoretically this should be the solution, but the problem is, that the wizard config ;;wizards[tx_wizards_uploads_path] is not respected for some reason
t3lib_div::loadTCA('tt_content'); $TCA['tt_content']['columns']['select_key']['config']['wizards']['tx_wizards_uploads_path'] = array( 'type' => 'popup', 'enableByTypeConfig' => 1, 'title' => 'Link', 'icon' => 'link_popup.gif', 'script' => 'browse_links.php?mode=wizard&act=folder', 'JSopenParams' => 'height=300,width=500,status=0,menubar=0,scrollbars=1', 'params' => array ( 'blindLinkOptions' => 'page,mail,url,file' ) ); $TCA['tt_content']['palettes']['uploads']['showitem'] = str_replace( 'select_key;LLL:EXT:cms/locallang_ttc.xml:select_key.ALT.uploads_formlabel', 'select_key;LLL:EXT:cms/locallang_ttc.xml:select_key.ALT.uploads_formlabel;;wizards[tx_wizards_uploads_path]', $TCA['tt_content']['palettes']['uploads']['showitem'] );
Updated by Kay Strobach over 12 years ago
This is working, as the field gots moved from the palette to the root type level ;)
if (!defined('TYPO3_MODE')) { die ('Access denied.'); } t3lib_div::loadTCA('tt_content'); $TCA['tt_content']['columns']['select_key']['config']['wizards']['tx_wizards_uploads_path'] = array( 'type' => 'popup', 'enableByTypeConfig' => 0, 'title' => 'Link', 'icon' => 'link_popup.gif', 'script' => 'browse_links.php?mode=wizard&act=folder', 'JSopenParams' => 'height=300,width=500,status=0,menubar=0,scrollbars=1', 'params' => array ( 'blindLinkOptions' => 'page,mail,url,file' ) ); $TCA['tt_content']['palettes']['uploads']['showitem'] = str_replace( 'select_key;LLL:EXT:cms/locallang_ttc.xml:select_key.ALT.uploads_formlabel,', '', $TCA['tt_content']['palettes']['uploads']['showitem'] ); $TCA['tt_content']['types']['uploads']['showitem'] = str_replace( '--palette--;LLL:EXT:cms/locallang_ttc.xml:media;uploads', 'select_key;LLL:EXT:cms/locallang_ttc.xml:select_key.ALT.uploads_formlabel;;wizards[tx_wizards_uploads_path], --palette--;LLL:EXT:cms/locallang_ttc.xml:media;uploads', $TCA['tt_content']['types']['uploads']['showitem'] );
Updated by Ralf Hettinger about 12 years ago
Thanks Kay,
I can confirm that your solution is working.
Updated by Mathias Schreiber almost 10 years ago
- Description updated (diff)
- Status changed from New to Closed