Created
August 13, 2015 08:35
-
-
Save ABooooo/02d2bbeb15342d165da6 to your computer and use it in GitHub Desktop.
realURL and news system
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
//realurl_config.php (we have to change two files) | |
// change "newsDetailConfiguration" with a blog single page id | |
<?php | |
$TYPO3_CONF_VARS['FE']['addRootLineFields'].= ',tx_realurl_pathsegment'; | |
$TYPO3_CONF_VARS['EXTCONF']['realurl']['_DEFAULT'] = array( | |
'pagePath' => array( | |
'type' => 'user', | |
'userFunc' => 'EXT:realurl/class.tx_realurl_advanced.php:&tx_realurl_advanced->main', | |
'spaceCharacter' => '-', | |
'languageGetVar' => 'L', | |
'expireDays' => '3', | |
'rootpage_id' => 1, | |
'firstHitPathCache'=>1 | |
), | |
'init' => array( | |
'enableCHashCache' => TRUE, | |
'enableCHashCache' => 1, | |
'respectSimulateStaticURLs' => 0, | |
'enableUrlDecodeCache' => 1, | |
'enableUrlEncodeCache' => 1 | |
), | |
'preVars' => array( | |
array( | |
'GETvar' => 'L', | |
'valueMap' => array( | |
'en' => '1', | |
), | |
'noMatch' => 'bypass', | |
), | |
array( | |
'GETvar' => 'no_cache', | |
'valueMap' => array( | |
'nc' => 1, | |
), | |
'noMatch' => 'bypass', | |
), | |
), | |
'fixedPostVars' => array( | |
'newsDetailConfiguration' => array( | |
array( | |
'GETvar' => 'tx_news_pi1[news]', | |
'lookUpTable' => array( | |
'table' => 'tx_news_domain_model_news', | |
'id_field' => 'uid', | |
'alias_field' => 'title', | |
'addWhereClause' => ' AND NOT deleted', | |
'useUniqueCache' => 1, | |
'useUniqueCache_conf' => array( | |
'strtolower' => 1, | |
'spaceCharacter' => '-' | |
), | |
'languageGetVar' => 'L', | |
'languageExceptionUids' => '', | |
'languageField' => 'sys_language_uid', | |
'transOrigPointerField' => 'l10n_parent', | |
'autoUpdate' => 1, | |
'expireDays' => 180, | |
) | |
) | |
), | |
'newsCategoryConfiguration' => array( | |
array( | |
'GETvar' => 'tx_news_pi1[overwriteDemand][categories]', | |
'lookUpTable' => array( | |
'table' => 'tx_news_domain_model_category', | |
'id_field' => 'uid', | |
'alias_field' => 'title', | |
'addWhereClause' => ' AND NOT deleted', | |
'useUniqueCache' => 1, | |
'useUniqueCache_conf' => array( | |
'strtolower' => 1, | |
'spaceCharacter' => '-' | |
) | |
) | |
) | |
), | |
'newsTagConfiguration' => array( | |
array( | |
'GETvar' => 'tx_news_pi1[overwriteDemand][tags]', | |
'lookUpTable' => array( | |
'table' => 'tx_news_domain_model_tag', | |
'id_field' => 'uid', | |
'alias_field' => 'title', | |
'addWhereClause' => ' AND NOT deleted', | |
'useUniqueCache' => 1, | |
'useUniqueCache_conf' => array( | |
'strtolower' => 1, | |
'spaceCharacter' => '-' | |
) | |
) | |
) | |
), | |
'52' => 'newsDetailConfiguration', | |
/*'701' => 'newsDetailConfiguration', // For additional detail pages, add their uid as well | |
'71' => 'newsTagConfiguration', | |
'72' => 'newsCategoryConfiguration',*/ | |
), | |
'postVarSets' => array( | |
'_DEFAULT' => array( | |
'controller' => array( | |
array( | |
'GETvar' => 'tx_news_pi1[action]', | |
'noMatch' => 'bypass' | |
), | |
array( | |
'GETvar' => 'tx_news_pi1[controller]', | |
'noMatch' => 'bypass' | |
) | |
), | |
'dateFilter' => array( | |
array( | |
'GETvar' => 'tx_news_pi1[overwriteDemand][year]', | |
), | |
array( | |
'GETvar' => 'tx_news_pi1[overwriteDemand][month]', | |
), | |
), | |
'page' => array( | |
array( | |
'GETvar' => 'tx_news_pi1[@widget_0][currentPage]', | |
), | |
), | |
), | |
), | |
); | |
?> | |
// ext_localconf.php in root_folder/typo3conf/ext/news | |
$TYPO3_CONF_VARS['EXTCONF']['realurl']['_DEFAULT']['postVarSets']['_DEFAULT']['action'] = array( | |
array( | |
'GETvar' => 'tx_news_pi1[controller]', | |
), | |
array( | |
'GETvar' => 'tx_news_pi1[action]', | |
), | |
); | |
$TYPO3_CONF_VARS['EXTCONF']['realurl']['_DEFAULT']['postVarSets']['_DEFAULT']['news'] = array( | |
array( | |
'GETvar' => 'tx_news_pi1[news]', | |
'lookUpTable' = > array( | |
'table' => 'tx_news_domain_model_news', | |
'id_field' => 'uid', | |
'alias_field' => 'title', | |
'addWhereClause' => 'AND NOT deleted', | |
'useUniqueCache' => 1, | |
'useUniqueCache_conf' => array( | |
'strtolower' => 1, | |
'spaceCharacter' => '-', | |
), | |
'enable404forInvalidAlias' => '1', | |
), | |
) | |
); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment