TYPO3 扩展新闻和 realurl

TYPO3 extension news and realurl

TYPO3 v 7.6.13 新闻5.3.1 真实网址 2.1.5

我已将 ext:news 的常用 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'
),

请注意,这删除了这些参数,在详细操作不是默认的页面上,无法显示新闻详细信息。