2016-10-08 6 views
1

Ich habe ein Problem mit der News-Konfiguration für realurl.
TYPO3: 7.6.11
realurl: 2.1.4
news: 5.2.0Realurl-Konfiguration für news-Extensi

ich folgende realurl_conf.php erstellt. (http://pastebin.com/GsYVaaDr):

<?php 
// realurl naming precedence configuration 
$TYPO3_CONF_VARS['FE']['addRootLineFields'] .= 'tx_realurl_pathsegment,alias,title'; 

$TYPO3_CONF_VARS['EXTCONF']['realurl']['p372493.mittwaldserver.info'] = array(
    'init' => array(
     'enableCHashCache' => true, 
     'appendMissingSlash' => 'ifNotFile', 
     'adminJumpToBackend' => true, 
     'enableUrlDecodeCache' => true, 
     'enableUrlEncodeCache' => true, 
     'emptyUrlReturnValue' => '/', 
     // Allow for proper SEO 404 handling 
     'postVarSet_failureMode' => '' 
    ), 

    'redirects' => array(), 
    'preVars' => array(
     array(
      'GETvar' => 'no_cache', 
      'valueMap' => array(
       'nc' => 1 
      ), 
      'noMatch' => 'bypass' 
     ), 
     array(
      'GETvar' => 'L', 
      'valueMap' => array(
       // Sprachvariable Deutsch 
       'de' => '0', 
      ), 
     'noMatch' => 'bypass', 
     ), 
    ), 
    // PAGEPATH mit Standard-Realurl-Konfiguration 
    'pagePath' => array(
     'type' => 'user', 
     'userFunc' => 'EXT:realurl/class.tx_realurl_advanced.php:&tx_realurl_advanced->main', 
     'spaceCharacter' => '-', 
     'languageGetVar' => 'L', 
     'rootpage_id' => 1, 
     'expireDays' => 30, 
     // Nimmt Sysordner aus der Rootline (aktuell auskommentiert!) 
     'excludeDoktypes' => '254', 
     'segTitleFieldList' => 'tx_realurl_pathsegment,alias,title' 
    ), 
    'fixedPostVars' => array(
     'newsDetailConfiguration' => array(
      array(
       'GETvar' => 'tx_news_pi1[action]', 
       'valueMap' => array(
        'detail' => '', 
       ), 
       'noMatch' => 'bypass' 
      ), 
      array(
       'GETvar' => 'tx_news_pi1[controller]', 
       'valueMap' => array(
        'News' => '', 
       ), 
       'noMatch' => 'bypass' 
      ), 

      'dateFilter' => array(
       array(
        'GETvar' => 'tx_newss_pi1[year]', 
       ), 
       array(
        'GETvar' => 'tx_newss_pi1[month]', 
        'valueMap' => array (
         'january' => '01', 
         'february' => '02', 
         'march' => '03', 
         'april' => '04', 
         'may' => '05', 
         'june' => '06', 
         'july' => '07', 
         'august' => '08', 
         'september' => '09', 
         'october' => '10', 
         'november' => '11', 
         'december' => '12', 
        ), 
       ), 
       array(
        'GETvar' => 'tx_newss_pi1[day]', 
       ), 
      ), 

      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, 
       ), 
      ), 
     ), 
    ), 
    'postVarSets' => array(
     '_DEFAULT' => array(

      // NEWS 
      'newsCategoryConfiguration' => array(
       array(
        'GETvar' => 'tx_news_pi1[overwriteDemand][categories]', 
        'lookUpTable' => array(
         'table' => 'sys_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' => '-' 
         ), 
        ), 
       ), 
      ), 
      '28' => 'newsDetailConfiguration', 
#   '701' => 'newsDetailConfiguration', // For additional detail pages, add their uid as well 
#   '71' => 'newsTagConfiguration', 
#   '72' => 'newsCategoryConfiguration',   

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

//   'archiv' => array(
//    'GETvar' => '', 
//    noMatch => 'bypass' 
//   ), 
     // NEWS 
     ), 
    ), 
    'fileName' => array (
     'defaultToHTMLsuffixOnPrev' => true, 
     'index' => array(
      'sitemap.xml' => array(
       'keyValues' => array(
        'type' => 841132, 
       ), 
      ), 
      'feed.rss' => array(
       'keyValues' => array(
        type => 9818, 
       ), 
      ), 
      'calender.ical' => array (
       'keyValue' => array(
        type => 9819, 
       ), 
      ), 

      'robots.txt' => array(
       'keyValues' => array(
        'type' => 841133 
       ), 
      ), 

      'drucken.html' => array(
       'keyValues' => array(
        'type' => '98', 
        'print' => '1' 
       ), 
      ), 

      'index.html' => array(
       'keyValues' => array(
        'type' => '0', 
       ), 
      ), 
     ), 
     'defaultToHTMLsuffixOnPrev' => true, 
     'acceptHTMLsuffix' => true, 
    ), 

); 
?> 

konfiguriert ich die Nachrichten-Plugin wie folgt.

plugin.tx_news { 
    settings { 
    backPid = 25 
    listPid = 25 

    detail { 
     showPrevNext = 1 
     showSocialShareButtons = 0 
    } 

    list { 
     media { 
     image > 
     image { 
      maxWidth = 75 
      maxHeight = 75 
     } 
     } 
    } 

    link { 
     skipControllerAndAction = 1 
     hrDate = 1 
     hrDate { 
     day = d 
     month = m 
     year = Y 
     } 
    }  

    paginate { 
     itemsPerPage = 10 
     insertAbove = 1 
     insertBelow = 1 
     templatePath = 
     prevNextHeaderTags = 1 
     maximumNumberOfLinks = 3 
    } 

    analytics.social { 
     facebookLike = 0 
     facebookShare = 0 
     twitter = 0 
    } 
    } 
    predefine.archive = +1 Month 
} 

Diese Konfiguration Adressen in der folgenden Form gibt:

/nachricht/detail/News/news-title/archiv/2016/september.html?tx_news_pi1%5Bday%5D=2 & cHash = bc08b3c694b77edd4d3de72396906807

aber ich brauche eine Ausgabe wie diese Form Adresse:

/nachricht/detail/News/2016/09/02/news-title.html

Nachricht ist der Titel der Seite. Die Grundkonfiguration von realurl läuft gut.

Jemand hat eine Idee oder kann mir sagen, wie ich meinen News-Teil der Konfiguration aktualisiere?

Antwort

3

Zuerst ändern Sie 'enableCHashCache' => true zu 'enableCHashCache' => FALSE in Ihrer realurl_conf.php für entfernen Sie cHash = .... von Ihrer URL. und ändern Sie den Code im postVatSets-Array für realurl. Probieren Sie diese Lösung aus und lassen Sie mich Ihr Feedback wissen. Dieser Code funktioniert für mich.

'postVarSets' => array(
     '_DEFAULT' => array(
      //archive 
      'period' => array (
       array (
        'condPrevValue' => -1, 
        'GETvar' => 'tx_ttnews[pS]', 
        //'valueMap => array() 
        ), 
       array (
        'GETvar' => 'tx_ttnews[pL]', 
        //'valueMap => array() 
        ), 

       array (
        'GETvar' => 'tx_ttnews[arc]', 
        'valueMap' => array(
         'non-archived' => -1, 
         ), 
        ), 
       ), 
      'archive' => array(
        array(
         'GETvar' => 'tx_ttnews[year]' , 
         ), 
        array(
         'GETvar' => 'tx_ttnews[month]' , 
          'valueMap' => array(
          'january' => '01', 
          'february' => '02', 
          'march' => '03', 
          'april' => '04', 
          'may' => '05', 
          'june' => '06', 
          'july' => '07', 
          'august' => '08', 
          'september' => '09', 
          'october' => '10', 
          'november' => '11', 
          'december' => '12', 
          ) 
         ), 
        ), 

      'browse' => array (
       array (
        'GETvar' => 'tx_ttnews[pointer]', 
        ), 
       ), 
      'select' => array (
       array (
        'GETvar' => 'tx_ttnews[cat]', 
        'lookUpTable' => array (
         'table'  => 'tt_news_cat', 
         'id_field' => 'uid', 
         'alias_field' => 'title', 
         'addWhereClause'=> 'AND NOT deleted', 
         'useUniqueCache'=> 1, 
         'useUniqueCache_conf' => array (
          'strtolower'  => 1, 
          'spaceCharacter' => '-', 
          ), 
         ), 
        ), 
       ), 
      'article' => array( 

       array (
        'GETvar' => 'tx_ttnews[tt_news]', 
        'lookUpTable' => array (
         'table'  => 'tt_news', 
         'id_field' => 'uid', 
         'alias_field' => 'title', 
         'addWhereClause'=> 'AND NOT deleted', 
         'useUniqueCache'=> 1, 
         'useUniqueCache_conf' => array (
          'strtolower'  => 1, 
          'spaceCharacter' => '-', 
          ), 
         ), 
        ), 
       ), 
      ), 
     ), 
+0

Hallo Vimal, ich war im Urlaub und ich versuche Ihre Config morgen Abend und gebe Ihnen eine Antwort. Vielen Dank für Ihr Feedback und ich hoffe, es wird für mein Problem hilfreich sein. –

+0

Okay, lassen Sie es zuerst versuchen und lassen Sie mich wissen, Lösung ist Arbeit oder nicht. –

+0

Thx, mit dieser Schnipsel konnte ich den Datumszeiger meines News-EXT konfigurieren. Es war hilfreich. –

Verwandte Themen