Created
November 28, 2018 10:47
-
-
Save davdenic/f253236a9687a1a71d081056fef4f20a to your computer and use it in GitHub Desktop.
Remove realurl detail path
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// put this two function at the begin of realurl_userconf.php file | |
function user_encodeSpURL_postProc(&$params, &$ref) { | |
// $params['URL'] = str_replace('calendar/location/tx_cal_location/location/', 'calendar/location/', $params['URL']); | |
// $params['URL'] = str_replace('calendar/organizer/tx_cal_organizer/organizer/', 'calendar/organizer/', $params['URL']); | |
// $params['URL'] = str_replace('calendar/tx_cal_phpicalendar/event/2011/', 'calendar/2011/', $params['URL']); | |
// $params['URL'] = str_replace('calendar/tx_cal_phpicalendar/event/2012/', 'calendar/2012/', $params['URL']); | |
// $params['URL'] = str_replace('calendar/tx_cal_phpicalendar/event/2013/', 'calendar/2013/', $params['URL']); | |
$params['URL'] = str_replace('event/tx_cal_phpicalendar/', 'evento/', $params['URL']); | |
$params['URL'] = str_replace('news/news-detail/news/', 'dettaglio-news/', $params['URL']); | |
} | |
function user_decodeSpURL_preProc(&$params, &$ref) { | |
// $params['URL'] = str_replace('calendar/location/', 'calendar/location/tx_cal_location/location/', $params['URL']); | |
// $params['URL'] = str_replace('calendar/organizer/', 'calendar/organizer/tx_cal_organizer/organizer/', $params['URL']); | |
// $params['URL'] = str_replace('calendar/2011/', 'calendar/tx_cal_phpicalendar/event/2011/', $params['URL']); | |
// $params['URL'] = str_replace('calendar/2012/', 'calendar/tx_cal_phpicalendar/event/2012/', $params['URL']); | |
// $params['URL'] = str_replace('calendar/2013/', 'calendar/tx_cal_phpicalendar/event/2013/', $params['URL']); | |
$params['URL'] = str_replace('evento/', 'event/tx_cal_phpicalendar/', $params['URL']); | |
$params['URL'] = str_replace('dettaglio-news/', 'news/news-detail/news/', $params['URL']); | |
} | |
$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['realurl']=array ( | |
// put this two encode/decode at the begin of realurl conf array | |
'encodeSpURL_postProc' => array('user_encodeSpURL_postProc'), | |
'decodeSpURL_preProc' => array('user_decodeSpURL_preProc'), | |
// begin of default realurl conf array | |
'_DEFAULT' => | |
... |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment