2017-01-05 198 views
0

TYPO3 v 7.6.13 新聞5.3.1 realurl 2.1.5TYPO3擴展新聞和realurl

我已經添加了轉股票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 

    ), 
    ), 
), 
); 

感謝如果有人可以建議什麼是我的設置缺少或錯誤。

+0

也許你可以告訴我們你認爲哪裏錯了? –

+0

行動和控制器正在寫入的網址以及頁面? – Tom

回答

0

當你配置

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' 
), 

請注意,此刪除這些參數,上網頁,詳細的行動不是默認無法顯示的消息的詳細信息。

+0

這很好,謝謝。 – Tom

+0

現在唯一的問題是,我的URL字符串從 www.mysite.com/news/story/news/detail/News/thisismystorytitle 去 www.mysite.com//story/news/News/thisismystorytitle – Tom

+0

嘗試清除real_url和TYPO3緩存。在我看來,上面的變化不應該導致這種行爲。檢查你是否忘記了逗號或大括號。 –