Feature #90629

Possibility of displaying a table directly in single view in module "list"

Added by Robert von Hackwitz over 1 year ago. Updated over 1 year ago.

Status:
Accepted
Priority:
Should have
Assignee:
-
Category:
Backend User Interface
Start date:
2020-03-03
Due date:
% Done:

0%

Estimated time:
PHP Version:
7.2
Tags:
Complexity:
easy
Sprint Focus:

Description

It would be useful to have the possibility to configure through mod.web_list that a table in a system folder will be displayed directly in "single view" mode (eg: in Page TSConfig something like

mod.web_list {
  displaySingleTable = tx_news_domain_model_news
}

Perhaps modifying method init() in sysext/recordlist/Classes/Contoller/RecordlistController.php
from

protected function init()
    {

        $this->iconFactory = GeneralUtility::makeInstance(IconFactory::class);
        $backendUser = $this->getBackendUserAuthentication();
        $this->perms_clause = $backendUser->getPagePermsClause(Permission::PAGE_SHOW);
        // Get session data
        $sessionData = $backendUser->getSessionData(__CLASS__);
        $this->search_field = !empty($sessionData['search_field']) ? $sessionData['search_field'] : '';
        // GPvars:
        $this->id = (int)GeneralUtility::_GP('id');
        $this->pointer = GeneralUtility::_GP('pointer');
        // @deprecated since TYPO3 v9, will be removed in TYPO3 v10.0.
        $this->imagemode = GeneralUtility::_GP('imagemode');
        $this->table = GeneralUtility::_GP('table');
        $this->search_field = GeneralUtility::_GP('search_field');
        $this->search_levels = (int)GeneralUtility::_GP('search_levels');
        $this->showLimit = GeneralUtility::_GP('showLimit');
        $this->returnUrl = GeneralUtility::sanitizeLocalUrl(GeneralUtility::_GP('returnUrl'));
        $this->clear_cache = GeneralUtility::_GP('clear_cache');
        $this->cmd = GeneralUtility::_GP('cmd');
        $this->cmd_table = GeneralUtility::_GP('cmd_table');
        $sessionData['search_field'] = $this->search_field;
        // Initialize menu
        $this->menuConfig();

        // Store session data
        $backendUser->setAndSaveSessionData(self::class, $sessionData);
        $this->getPageRenderer()->addInlineLanguageLabelFile('EXT:core/Resources/Private/Language/locallang_mod_web_list.xlf');
    }

to

protected function init()
    {

        $this->iconFactory = GeneralUtility::makeInstance(IconFactory::class);
        $backendUser = $this->getBackendUserAuthentication();
        $this->perms_clause = $backendUser->getPagePermsClause(Permission::PAGE_SHOW);
        // Initialize menu
        $this->menuConfig();
        // Get session data
        $sessionData = $backendUser->getSessionData(__CLASS__);
        $this->search_field = !empty($sessionData['search_field']) ? $sessionData['search_field'] : '';
        // GPvars:
        $this->id = (int)GeneralUtility::_GP('id');
        $this->pointer = GeneralUtility::_GP('pointer');
        // @deprecated since TYPO3 v9, will be removed in TYPO3 v10.0.
        $this->imagemode = GeneralUtility::_GP('imagemode');
        $this->table =  GeneralUtility::_GP('table') ?? $this->modTSconfig['properties']['displaySingleTable'];
        $this->search_field = GeneralUtility::_GP('search_field');
        $this->search_levels = (int)GeneralUtility::_GP('search_levels');
        $this->showLimit = GeneralUtility::_GP('showLimit');
        $this->returnUrl = GeneralUtility::sanitizeLocalUrl(GeneralUtility::_GP('returnUrl'));
        $this->clear_cache = GeneralUtility::_GP('clear_cache');
        $this->cmd = GeneralUtility::_GP('cmd');
        $this->cmd_table = GeneralUtility::_GP('cmd_table');
        $sessionData['search_field'] = $this->search_field;

        // Store session data
        $backendUser->setAndSaveSessionData(self::class, $sessionData);
        $this->getPageRenderer()->addInlineLanguageLabelFile('EXT:core/Resources/Private/Language/locallang_mod_web_list.xlf');
    }

Related issues

Related to TYPO3 Core - Story #82206: list module enhancements/bugfixesNew2005-07-21

Actions
#1

Updated by Georg Ringer over 1 year ago

  • Status changed from New to Accepted
#2

Updated by Daniel Windloff about 1 year ago

  • Related to Story #82206: list module enhancements/bugfixes added

Also available in: Atom PDF