Feature #72306

Add a additional vars hook in the View Module

Added by Dave no-lastname-given over 6 years ago. Updated about 2 years ago.

Status:
Accepted
Priority:
Could have
Assignee:
-
Category:
Backend API
Start date:
2015-12-18
Due date:
% Done:

0%

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

Description

It would be nice to have a hook in the pageview sysext so that additional vars could be added to the page preview target url.
I can hook into the viewOnClick in the BackendUtility to add additional vars but not in the pageview extension itself.

Something like:
(in sysext/viewpage/Classes/Controller/ViewModuleController.php->getTargetUrl() @line:~154)

// Hook to append additional get vars.
$additionalGetVars = '';
if (isset($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['viewpage/ViewModuleController.php']['getTargetUrl']) && is_array($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['viewpage/ViewModuleController.php']['getTargetUrl'])) {
    foreach ($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['viewpage/ViewModuleController.php']['getTargetUrl'] as $funcRef) {
        $hookObj = \TYPO3\CMS\Core\Utility\GeneralUtility::getUserObj($funcRef);
        if (method_exists($hookObj, 'setAdditionalGetVars')) {
            $hookObj->setAdditionalGetVars($additionalGetVars);
        }
    }
}
return $protocolAndHost . '/index.php?id=' . $finalPageIdToShow . $this->getTypeParameterIfSet($finalPageIdToShow) . $mountPointMpParameter . $adminCommand . $languageParameter . $additionalGetVars;


Related issues

Related to TYPO3 Core - Epic #88027: Properly handle Hooks/Signals and EventsIn ProgressBenni Mack2022-04-22

Actions
#1

Updated by Benni Mack about 3 years ago

  • Related to Epic #88027: Properly handle Hooks/Signals and Events added
#2

Updated by Christian Eßl over 2 years ago

  • Category set to Backend API
#3

Updated by Georg Ringer about 2 years ago

  • Status changed from New to Accepted
  • Target version set to Candidate for Major Version

Also available in: Atom PDF