TYPO3、Realurl、新闻:我没弄对
TYPO3, Realurl, News: I am not getting right
我有一个非常简单的 Realurl 2.0 + News 配置,但它仍然无法正常工作。
我得到了类似的东西
http://mydomain/list-news-page/single-news-page/news/single-news-title/News/?tx_news_pi1[action]=detail&cHash=5f96d3b6bebd41076d2f752ea4d068d4
我希望删除 /News/?tx_news_pi1[action]=detail&cHash=5f96d3b6bebd41076d2f752ea4d068d4
部分。我的 typo3conf/realurl.autoconf.php
集:
'postVarSets' =>
array (
'_DEFAULT' =>
array (
'news' =>
array (
array( 'GETvar' => 'tx_news_pi1[action]', ),
array( 'GETvar' => 'tx_news_pi1[controller]',
),
0 =>
array (
'GETvar' => 'tx_news_pi1[news]',
'lookUpTable' =>
array (
'table' => 'tx_news_domain_model_news',
'id_field' => 'uid',
'alias_field' => 'title',
'useUniqueCache' => 1,
'useUniqueCache_conf' =>
array (
'strtolower' => 1,
'spaceCharacter' => '-',
), ), ), ), ), )
我也有
[globalVar = GP:L =0]
....
config.defaultGetVars {
tx_news_pi1 {
controller=Notizie
action=Dettaglio
}
}
[global]
但是好像不行。
最后,如果我取消设置 Enable automatic configuration [basic.enableAutoConf]
,页面将不会呈现。
TYPO3 6.2.23.
您的代码中有几个错误。
1st:不要翻译动作本身,所以配置应该是
config.defaultGetVars {
tx_news_pi1 {
controller=News
action=detail
}
}
2nd: 看看manual.
您需要使用
将新闻 uid 映射到标题
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,
)
)
我有一个非常简单的 Realurl 2.0 + News 配置,但它仍然无法正常工作。
我得到了类似的东西
http://mydomain/list-news-page/single-news-page/news/single-news-title/News/?tx_news_pi1[action]=detail&cHash=5f96d3b6bebd41076d2f752ea4d068d4
我希望删除 /News/?tx_news_pi1[action]=detail&cHash=5f96d3b6bebd41076d2f752ea4d068d4
部分。我的 typo3conf/realurl.autoconf.php
集:
'postVarSets' =>
array (
'_DEFAULT' =>
array (
'news' =>
array (
array( 'GETvar' => 'tx_news_pi1[action]', ),
array( 'GETvar' => 'tx_news_pi1[controller]',
),
0 =>
array (
'GETvar' => 'tx_news_pi1[news]',
'lookUpTable' =>
array (
'table' => 'tx_news_domain_model_news',
'id_field' => 'uid',
'alias_field' => 'title',
'useUniqueCache' => 1,
'useUniqueCache_conf' =>
array (
'strtolower' => 1,
'spaceCharacter' => '-',
), ), ), ), ), )
我也有
[globalVar = GP:L =0]
....
config.defaultGetVars {
tx_news_pi1 {
controller=Notizie
action=Dettaglio
}
}
[global]
但是好像不行。
最后,如果我取消设置 Enable automatic configuration [basic.enableAutoConf]
,页面将不会呈现。
TYPO3 6.2.23.
您的代码中有几个错误。
1st:不要翻译动作本身,所以配置应该是
config.defaultGetVars {
tx_news_pi1 {
controller=News
action=detail
}
}
2nd: 看看manual.
您需要使用
将新闻 uid 映射到标题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,
)
)