[TYPO3-english] tt_news + realurl
Christian Hennecke
christian.hennecke at wunderknaben.com
Fri Jun 29 09:36:01 CEST 2012
Am 29.06.2012 00:39, schrieb Gerardo Tan:
> After realurl setup, the url structure of every news item becomes
> www.mysite.com/path/to/page/*news-detail/article*/news-title/. How can I
> configure tt_news/realurl such that the */news-detail/article *part will be
> removed?
You need to use fixedPostVars instead of postVarSets. Like this:
$TYPO3_CONF_VARS['EXTCONF']['realurl']['_DEFAULT'] = array(
// ... other directives...
'fixedPostVars' => array(
'news' => array(
array(
'GETvar' => 'tx_ttnews[pointer]',
'valueMap' => array(),
'noMatch' => 'bypass',
),
array(
'GETvar' => 'tx_ttnews[tt_news]',
'lookUpTable' => array(
'table' => 'tt_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' => 'l18n_parent',
'autoUpdate' => 1,
'expireDays' => 180,
),
),
),
),
// ... other directives...
);
// RealURL - valueMap creation for tt-news
for($x=1; $x<=100; $x++) {
$TYPO3_CONF_VARS['EXTCONF']['realurl']['_DEFAULT']['fixedPostVars']['news'][0]['valueMap'][$x+1]
= $x;
}
// RealURL - page definition for tt_news
$TYPO3_CONF_VARS['EXTCONF']['realurl']['_DEFAULT']['fixedPostVars']['id_of_the_page_showing_news']
= 'news';
-----------------------------------------------------------------------
Beware, it might not suit everybody's needs and it has some drawbacks:
- the articles cannot have a number from 1 to 100 as a title
- you have to add each page that displays news into localconf.php
- no backpid
More information about the TYPO3-english
mailing list