Zum Inhalt springen

realurl - Pfadgenerierung

Erstellt am 12. Oktober 2018 · 1 Antwort · letzte Antwort am 12. Oktober 2018

Tags: TYPO3 8, Frage

MaDi89 ·

Guten Morgen,

ich benutze zur Zeit die Standardkonfiguration von realurl. Leider spuckt
mir diese folgende Pfade für die einzelnen News aus:

https://www.domain.com/neuigkeiten/news/einzelne-neuigkeit/?tx_news_pi1%5Bcontroller%5D=News&tx_news_pi1%5Baction%5D=detail&cHash=8c9a042ba4892a51021877392a27974b

Wie bekomme ich den Wert "?tx_news_pi1%5Bcontroller%5D=News&tx_news_pi1%5Baction%5D=detail&cHash=8c9a042ba4892a51021877392a27974b" raus?

Hier noch meine realurl-Config:

<?php
$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['realurl']=array (
'_DEFAULT' =>
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,
),
),
),
),
'postVarSets' =>
array (
'_DEFAULT' =>
array (
'news' =>
array (
0 =>
array (
'GETvar' => 'tx_news_pi1[news]',
'lookUpTable' =>
array (
'table' => 'tx_news_domain_model_news',
'id_field' => 'uid',
'alias_field' => 'IF(path_segment!="",path_segment,title)',
'addWhereClause' => ' AND NOT deleted',
'useUniqueCache' => 1,
'expireDays' => 180,
'enable404forInvalidAlias' => true,
),
),
),
),
),
),
);

MaDi89 ·

Das Problem konnte ich mit folgender Config selbst lösen (Die 74 ist die Detailansicht-Page):

<?php
$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['realurl']=array (
  '_DEFAULT' => 
  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,
          ),
        ),
      ),
    ),
    'postVarSets' => 
    array (
      '_DEFAULT' => 
      array (
        'news' => 
        array (
          74 => 
          array(
            'GETvar' => 'tx_news_pi1[action]',
            'valueMap' => array(),
            'noMatch' => 'bypass'
          ),
              array(
            'GETvar' => 'tx_news_pi1[controller]',
            'valueMap' => array(),
            'noMatch' => 'bypass'
        ),          
          array (
            'GETvar' => 'tx_news_pi1[news]',
            'lookUpTable' => 
            array (
              'table' => 'tx_news_domain_model_news',
              'id_field' => 'uid',
              'alias_field' => 'IF(path_segment!="",path_segment,title)',
              'addWhereClause' => ' AND NOT deleted',
              'useUniqueCache' => 1,
              'expireDays' => 180,
              'enable404forInvalidAlias' => true,
            ),
          ),
        ),
      ),
    ),
  ),
);