[TYPO3-ttnews] How to localize news with realurl
David ARNOULT - Edition & Internet Operations
d.arnoult at topsolid.com
Fri Jun 11 12:16:04 CEST 2010
Hello All,
It is probably a newbie question.
I am trying to make realurl writing localized urls using tt_news articles, I
use versions of Typo 4.3.3 + tt_news 3.0.1 + realurl 1.8.1 (1.9.2 does not
work on my system).
I have added these in my 'postVarSets' as realurl documentation said about
tt_news:
'languageGetVar' => 'L',
'languageExceptionUids' => '',
'languageField' => 'sys_language_uid',
'transOrigPointerField' => 'l18n_parent',
But with no result : always default language is used (0). Cleared all
caches, I have checked in TCA and in database of tt_news, and all fieldnames
are OK.
Any clues guys? Is this a bug?
Anyone that would have a configuration like that that works?
David
Here is my realurl_conf.php:
<?php
$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['realurl']=array (
'_DEFAULT' => array(
'init' => array (
'enableCHashCache' => true,
'appendMissingSlash' => 'ifNotFile,redirect',
'adminJumpToBackend' => true,
'enableUrlDecodeCache' => true,
'enableUrlEncodeCache' => true,
'emptyUrlReturnValue' => '/',
'postVarSet_failureMode' => 'redirect_goodUpperDir',
'doNotRawUrlEncodeParameterNames' => 1,
'respectSimulateStaticURLs' => 1
),
'preVars' => array(
array(
'GETvar' => 'L',
'valueMap' => array(
'en' => 0,
'fr' => 1,
),
'noMatch' => 'bypass'
),
array(
'GETvar' => 'no_cache',
'valueMap' => array(
'no_cache' => 1,
),
'noMatch' => 'bypass',
),
),
'postVarSets' => array(
'_DEFAULT' => array(
// news
archive parameters
'archive' =>
array(
array(
'GETvar' => 'tx_ttnews[year]' ,
),
array(
'GETvar' => 'tx_ttnews[month]' ,
'valueMap' => array(
'january' => '01',
'february' => '02',
'march' => '03',
'april' => '04',
'may' => '05',
'june' => '06',
'july' => '07',
'august' => '08',
'september' => '09',
'october' => '10',
'november' => '11',
'december' => '12',
)
),
),
// news
pagebrowser
'browse' =>
array(
array(
'GETvar' => 'tx_ttnews[pointer]',
),
),
// news
categories
'select_category' => array (
array(
'GETvar' => 'tx_ttnews[cat]',
),
),
// news
articles and searchwords
'article' =>
array(
array(
'GETvar' => 'tx_ttnews[tt_news]',
'lookUpTable' => array(
'table' => 'tt_news',
'id_field' => 'uid',
'alias_field' => 'title',
'addWhereClause' => ' AND NOT deleted',
'languageGetVar' => 'L',
'languageExceptionUids' => '',
'languageField' => 'sys_language_uid',
'transOrigPointerField' => 'l18n_parent',
//'maxLength' => 50,
'useUniqueCache' => 1,
'useUniqueCache_conf' => array(
'strtolower' => 1,
'spaceCharacter' => '-',
),
),
),
array(
'GETvar' => 'tx_ttnews[swords]',
),
),
),
),
'pagePath' => array (
'type' => 'user',
'userFunc' =>
'EXT:realurl/class.tx_realurl_advanced.php:&tx_realurl_advanced->main',
'spaceCharacter' => '-',
'segTitleFieldList' => 'tx_realurl_pathsegment,alias,nav_title,title',
'languageGetVar' => 'L',
'rootpage_id' => 2,
'expireDays' => 7,
'disablePathCache' => '0',
'excludePageIds' => null,
'autoUpdatePathCache' => true
),
'fileName' => array (
'defaultToHTMLsuffixOnPrev' => '.htm',
'acceptHTMLsuffix' => 1,
),
),
'_DOMAINS' => array(
'encode' => array(
array(
'GETvar' => 'L',
'value' => '0',
'ifDifferentToCurrent' => true,
'useConfiguration' => '_DEFAULT',
'urlPrepend' => 'http://en.topsolid.com',
),
array(
'GETvar' => 'L',
'value' => '1',
'ifDifferentToCurrent' => true,
'useConfiguration' => '_DEFAULT',
'urlPrepend' => 'http://fr.topsolid.com',
),
),
'decode' => array(
'en.topsolid.com' => array(
'GETvars' => array(
'L' => '0',
),
'useConfiguration' => '_DEFAULT',
),
'fr.topsolid.com' => array(
'GETvars' => array(
'L' => '1',
),
'useConfiguration' => '_DEFAULT',
),
),
),
);
?>
Thanks for helping a Typo3 newbie
David ARNOULT
More information about the TYPO3-project-tt-news
mailing list