Posted By


tbrodard on 12/14/11

Tagged


Statistics


Viewed 91 times
Favorited by 0 user(s)

tt_news: RealURL, multilanguage


/ Published in: PHP
Save to your folder(s)

tt_news: RealURL, multilanguage


Copy this code and paste it in your HTML
  1. $TYPO3_CONF_VARS['EXTCONF']['realurl'] = array();
  2. $TYPO3_CONF_VARS['EXTCONF']['realurl']['_DEFAULT'] = array(
  3. 'init' => array(
  4. 'enableCHashCache' => 1
  5.  
  6. // disable enableUrlDecodeCache for multiple domains
  7. // as no root pid is caught and the system check to
  8. // see if correct page path is grabbed
  9. , 'enableUrlDecodeCache' => 0
  10. , 'enableUrlEncodeCache' => 0
  11. , 'appendMissingSlash' => 'ifNotFile'
  12. , 'respectSimulateStaticURLs' => 0
  13. , 'postVarSet_failureMode' => 'redirect_goodUpperDir'
  14. ),
  15. 'redirects' => array(),
  16. 'preVars' => array(
  17. // Langue
  18. 'GETvar' => 'L',
  19. 'valueMap' => array(
  20. 'it' => '2',
  21. 'de' => '0',
  22. 'fr' => '1',
  23. ),
  24. 'valueDefault' => 'de',
  25. ),
  26.  
  27. // No cache
  28. 'GETvar' => 'no_cache',
  29. 'valueMap' => array(
  30. 'no_cache' => 1,
  31. ),
  32. 'noMatch' => 'bypass',
  33. ),
  34. ),
  35. 'pagePath' => array(
  36. 'type' => 'user'
  37. , 'userFunc' => 'EXT:realurl/class.tx_realurl_advanced.php:&tx_realurl_advanced->main'
  38. , 'spaceCharacter' => '-'
  39. , 'languageGetVar' => 'L'
  40. , 'rootpage_id' => 1
  41. , 'disablePathCache' => 0
  42. , 'expireDays' => 7
  43. , 'segTitleFieldList' => 'tx_realurl_pathsegment,alias,nav_title,title'
  44. , 'excludePageIds' => null
  45. ),
  46. 'fixedPostVars' => array(),
  47. 'postVarSets' => array(
  48. '_DEFAULT' => array(
  49. // news archive parameters
  50. 'archive' => array(
  51. 'GETvar' => 'tx_ttnews[year]',
  52. ),
  53. 'GETvar' => 'tx_ttnews[month]',
  54. 'valueMap' => array(
  55. 'january' => '01',
  56. 'february' => '02',
  57. 'march' => '03',
  58. 'april' => '04',
  59. 'may' => '05',
  60. 'june' => '06',
  61. 'july' => '07',
  62. 'august' => '08',
  63. 'september' => '09',
  64. 'october' => '10',
  65. 'november' => '11',
  66. 'december' => '12',
  67. )
  68. ),
  69. ),
  70. // news pagebrowser
  71. 'browse' => array(
  72. 'GETvar' => 'tx_ttnews[pointer]',
  73. ),
  74. ),
  75. // news categories
  76. 'select_category' => array(
  77. 'GETvar' => 'tx_ttnews[cat]',
  78. ),
  79. ),
  80. // news articles and searchwords
  81. 'article' => array(
  82. 'GETvar' => 'tx_ttnews[tt_news]',
  83. 'lookUpTable' => array(
  84. 'table' => 'tt_news',
  85. 'id_field' => 'uid',
  86. 'alias_field' => 'title',
  87. 'addWhereClause' => ' AND NOT deleted',
  88. 'languageGetVar' => 'L',
  89. 'languageExceptionUids' => '',
  90. 'languageField' => 'sys_language_uid',
  91. 'transOrigPointerField' => 'l18n_parent',
  92. 'useUniqueCache' => 1,
  93. 'useUniqueCache_conf' => array(
  94. 'strtolower' => 1,
  95. 'spaceCharacter' => '-',
  96. ),
  97. ),
  98. ),
  99. 'GETvar' => 'tx_ttnews[swords]',
  100. ),
  101. ),
  102. ),
  103.  
  104.  
  105. ), // END postVarSets
  106.  
  107. // configure filenames for different pagetypes
  108. 'fileName' => array(
  109. // Put ".html" at the end of the URL
  110. 'defaultToHTMLsuffixOnPrev' => 0,
  111. 'index' => array(
  112. 'rss.xml' => array(
  113. 'keyValues' => array(
  114. 'type' => 100,
  115. ),
  116. ),
  117. 'rss091.xml' => array(
  118. 'keyValues' => array(
  119. 'type' => 101,
  120. ),
  121. ),
  122. 'rdf.xml' => array(
  123. 'keyValues' => array(
  124. 'type' => 102,
  125. ),
  126. ),
  127. 'atom.xml' => array(
  128. 'keyValues' => array(
  129. 'type' => 103,
  130. ),
  131. ),
  132. ),
  133. ),
  134. );
  135.  
  136. // Pour un fonctionnement correct du postVarSets, faire une copie du tableau d'origine, pour le domaine en question
  137. $TYPO3_CONF_VARS['EXTCONF']['realurl']['xxx.ch'] = $TYPO3_CONF_VARS['EXTCONF']['realurl']['_DEFAULT'];

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.