2013-11-26 7 views
1

TYPO3 확장 뉴스 시스템 및 실제 URL에 약간 문제가 있습니다.TYPO3 뉴스 시스템 및 RealURL

그것은

http://codem.dk/blog/artikel/usunde_energidrikke 

같은 URL을 보여주는하지만 난 내 realurl 파일에 플러그인 코드를 추가 한

http://codem.dk/blog/artikel/?tx_news_pi1[news]=5&cHash=5370a02c0dc7e653fede425de7ac9187 

처럼 보여주는, 그래서 내가 잘못 알고, 모든하지 않습니다하지 뉴스에 링크되어 있지 않은 다른 링크는 잘 작동합니다. 누군가가 typo3conf/realurl.php

을 볼 수 있습니다, 여기 무슨 일이야 : 실제 URL에 대한 확장 관리자에서

나는 구성 파일이 경로가?

Fluent/EXTBASE가있는 TYPO3 v. 6.1이 실행 중입니다.

realurl.php 파일은 다음과 같습니다 :

<?php 

$TYPO3_CONF_VARS['FE']['addRootLineFields'].= ',tx_realurl_pathsegment'; 
$TYPO3_CONF_VARS['EXTCONF']['realurl']['_DEFAULT'] = array(
     'pagePath' => array(
       'type' => 'user', 
       'userFunc' => 'EXT:realurl/class.tx_realurl_advanced.php:&tx_realurl_advanced->main', 
       'spaceCharacter' => '-', 
       'languageGetVar' => 'L', 
       'expireDays' => '3', 
       'rootpage_id' => 1, 
       'firstHitPathCache'=>1 
     ), 
     'init' => array(
       'enableCHashCache' => TRUE, 
       'enableCHashCache' => 1, 
       'respectSimulateStaticURLs' => 0, 
       'enableUrlDecodeCache' => 1, 
       'enableUrlEncodeCache' => 1 
     ), 
     'preVars' => array(
       array(
         'GETvar' => 'L', 
         'valueMap' => array(
           'en' => '1', 
         ), 
         'noMatch' => 'bypass', 
       ), 
       array(
         'GETvar' => 'no_cache', 
         'valueMap' => array(
           'nc' => 1, 
         ), 
         'noMatch' => 'bypass', 
       ), 
     ), 
     'fixedPostVars' => array(
       'newsDetailConfiguration' => array(
         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, 
           ) 
         ) 
       ), 
       'newsCategoryConfiguration' => array(
         array(
           'GETvar' => 'tx_news_pi1[overwriteDemand][categories]', 
           'lookUpTable' => array(
             'table' => 'tx_news_domain_model_category', 
             'id_field' => 'uid', 
             'alias_field' => 'title', 
             'addWhereClause' => ' AND NOT deleted', 
             'useUniqueCache' => 1, 
             'useUniqueCache_conf' => array(
               'strtolower' => 1, 
               'spaceCharacter' => '-' 
             ) 
           ) 
         ) 
       ), 
       'newsTagConfiguration' => array(
         array(
           'GETvar' => 'tx_news_pi1[overwriteDemand][tags]', 
           'lookUpTable' => array(
             'table' => 'tx_news_domain_model_tag', 
             'id_field' => 'uid', 
             'alias_field' => 'title', 
             'addWhereClause' => ' AND NOT deleted', 
             'useUniqueCache' => 1, 
             'useUniqueCache_conf' => array(
               'strtolower' => 1, 
               'spaceCharacter' => '-' 
             ) 
           ) 
         ) 
       ), 
       '52' => 'newsDetailConfiguration', 
       '701' => 'newsDetailConfiguration', // For additional detail pages, add their uid as well 
       '71' => 'newsTagConfiguration', 
       '72' => 'newsCategoryConfiguration', 

     ), 
     'postVarSets' => array(
       '_DEFAULT' => array(
         'controller' => array(
           array(
             'GETvar' => 'tx_news_pi1[action]', 
             'noMatch' => 'bypass' 
           ), 
           array(
             'GETvar' => 'tx_news_pi1[controller]', 
             'noMatch' => 'bypass' 
           ) 
         ), 

         'dateFilter' => array(
           array(
             'GETvar' => 'tx_news_pi1[overwriteDemand][year]', 
           ), 
           array(
             'GETvar' => 'tx_news_pi1[overwriteDemand][month]', 
           ), 
         ), 
         'page' => array(
           array(
             'GETvar' => 'tx_news_pi1[@widget_0][currentPage]', 
           ), 
         ), 
       ), 
     ), 

); 

?> 

(확장 매니저의 실제 URL 설정) 나는 당신이하기 위해 파일을 ext_localconf.php을 편집 할 생각 enter image description here

+0

가 RealURL 자동 구성의 전원이 꺼 졌는지 : – lorenz

+0

예 EM에서 "사용하도록 설정되지 않았습니다."기본 질문에 추가 된 이미지를 참조하십시오. –

답변

1

진짜 URL. 파일을 편집하고이 코드를 추가하고 결과를 알려주시겠습니까?

$TYPO3_CONF_VARS['EXTCONF']['realurl']['_DEFAULT']['postVarSets']['_DEFAULT']['action'] = array(
    array(
     'GETvar' => 'tx_news_pi1[controller]', 
    ), 
    array(
     'GETvar' => 'tx_news_pi1[action]', 
    ), 
); 

$TYPO3_CONF_VARS['EXTCONF']['realurl']['_DEFAULT']['postVarSets']['_DEFAULT']['news'] = array(
    array(
     'GETvar' => 'tx_news_pi1[news]', 
     'lookUpTable' = > array(
      'table' => 'tx_news_domain_model_news', 
      'id_field' => 'title', 
      'alias_field' => 'name', 
      'addWhereClause' => 'AND NOT deleted', 
      'useUniqueCache' => 1, 
      'useUniqueCache_conf' => array(
       'strtolower' => 1, 
       'spaceCharacter' => '-', 
      ), 
      'enable404forInvalidAlias' => '1', 
     ), 
    ) 
); 

파일은 root_folder/typo3conf/ext/news에 있습니다.

참고 : 파일을 변경하고 저장 한 직후 캐시를 지우십시오.

 'table' => 'tx_news_domain_model_news', 
     'id_field' => 'uid', 
     'alias_field' => 'title', 
+0

Hennett 님, 거의 작동 중입니다. THX ;-)하지만 뉴스 ID를 http://codem.dk/blog/artikel/news/5/ 및 http://codem.dk/blog/artikel/news와 같이 사용하고 있습니다./usunde_energidrikke/내가 그것을 바꾸는 곳은 어디입니까? –

+0

** id_field ** 및/또는 ** alias_field **로 무언가를해야합니다. 나는 당신이 어떤 가치를 바꾸어야하는지, 아니면 둘 다를 바꿔야하는지 확신 할 수 없다. 여기 [http://wiki.typo3.org/Realurl/manual](http://wiki.typo3.org/Realurl/manual)에서이 __-> lookUpTable__을 검색하십시오. 거기에 정의 테이블, 당신에게 힌트를 줄 수 있습니다. – barcasal

+0

안녕하세요, Hennett 님, pls 하시겠습니까? 답변을 추가하십시오. 및 THX –

0

다음 변경 대신 UID (codem.dk/blog/artikel/news/5)의 귀하의 링크에서 제목을 얻으려면?
관련 문제