From sw at n-image.com Mon Feb 26 10:42:24 2018 From: sw at n-image.com (Steve) Date: Mon, 26 Feb 2018 10:42:24 +0100 Subject: [TYPO3-dev] =?utf-8?q?_Realurl_-_new_GET_Params_for_readable_URL?= Message-ID: Hi, I'm using the extension realurl (2.2.1) with TYPO3 8.7. I want to set new individual GET-Parameters (personid and person) to my readable url. What I want: www.mydefaulturl.com/mypath/personid/123/person/franz_kafka/ What I get: www.mydefaulturl.com/mypath/?personid=123&person=franz_kafka&cHash=123456 What I've changed in my realurlconf.php: ------------------------ $TYPO3_CONF_VARS['EXTCONF']['realurl'] = array( '_DEFAULT' => array( // .... 'postVarSets' => array( '_DEFAULT' => array( 'persons' => array( array( 'GETvar' => 'personid', 'noMatch' => 'bypass' ), array( 'GETvar' => 'person', 'noMatch' => 'bypass' ) ), // .... ------------------------ What do I have to do, to get the new readable URL? I've tried to delete the cache in the install tool and I also deleted the realurl_autoconf.php. To build my Link with php, I use this function: ------------------------ public function getLinkToPageCacheable($urlParameters = array(), $altPageId = 0, $forceAbsoluteURL = false) { $conf = array(); $cache = 1; $str = ""; // \TYPO3\CMS\Extbase\Configuration\ConfigurationManagerInterface $cObj = $this->configurationManager->getContentObject(); if (!$cObj) { $cObj = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer'); } $otype = null; if (!$urlParameters['type'] && $GLOBALS['TSFE']->type > 0) { $otype = $GLOBALS['TSFE']->linkVars; $GLOBALS['TSFE']->linkVars = ''; } $conf['useCacheHash'] = $this->pi_USER_INT_obj ? 0 : $cache; $conf['no_cache'] = $this->pi_USER_INT_obj ? 0 : !$cache; $conf['parameter'] = $altPageId ? $altPageId : $GLOBALS['TSFE']->id; $conf['additionalParams'] = $this->conf['parent.']['addParams'] . \TYPO3\CMS\Core\Utility\GeneralUtility::implodeArrayForUrl('', $urlParameters, '', true) . $this->pi_moreParams; $conf['forceAbsoluteUrl'] = $forceAbsoluteURL; if (isset($otype)) { $GLOBALS['TSFE']->linkVars = $otype; } $link = $cObj->lastTypoLinkUrl; if (!preg_match("/^http/", $link)) { $link = \TYPO3\CMS\Core\Utility\GeneralUtility::getIndpEnv("TYPO3_SITE_URL") . $link; } return $link; } ------------------------