[英]TYPO3 extension news and realurl
TYPO3 v 7.6.13新闻5.3.1 realurl 2.1.5
我已将ext:news的stock realurl配置添加到我的网站(手动realurl.conf)。
我的网址显示为:
www.example.com/news/story/news/detail/News/thisismystorytitle
我的页面树:
Root
-News (News - List)
--Story (News - Detail)
我的realurl配置
<?php
$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['realurl']=array (
'www.mysite.com' =>
array (
'init' =>
array (
'appendMissingSlash' => 'ifNotFile,redirect',
'emptyUrlReturnValue' => '/',
),
'pagePath' =>
array (
'rootpage_id' => '1',
),
'fileName' =>
array (
'defaultToHTMLsuffixOnPrev' => 0,
'acceptHTMLsuffix' => 1,
'index' =>
array (
'print' =>
array (
'keyValues' =>
array (
'type' => 98,
),
),
),
),
'preVars' => array(
array(
'GETvar' => 'L',
'valueMap' => array('en'=>0, 'cy'=>1),
'noMatch' => 'bypass',
),
), // end preVars
'postVarSets' =>
array (
'_DEFAULT' =>
array (
// EXT:news start
'news' => array(
array(
'GETvar' => 'tx_news_pi1[action]',
),
array(
'GETvar' => 'tx_news_pi1[controller]',
),
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,
),
),
),
// EXT:news end
),
),
),
);
如果有人可以就我的设置中存在的不足或错误提出建议,我们深表感谢。
当您配置
array(
'GETvar' => 'tx_news_pi1[action]',
),
array(
'GETvar' => 'tx_news_pi1[controller]',
),
说,动作和控制器的变量通过。
附加valueMap和noMatch可以删除它们:
array(
'GETvar' => 'tx_news_pi1[action]',
'valueMap' => array(),
'noMatch' => 'bypass'
),
array(
'GETvar' => 'tx_news_pi1[controller]',
'valueMap' => array(),
'noMatch' => 'bypass'
),
请注意,这将删除这些参数,因为在默认操作不是默认操作的页面上,无法显示新闻详细信息。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.