TYPO3 extension news and realurl

1k views Asked by At

TYPO3 v 7.6.13 News 5.3.1 realurl 2.1.5

I’ve added the stock realurl configuration for ext:news to my site (manual realurl.conf).

And my URLs are reading as:

www.example.com/news/story/news/detail/News/thisismystorytitle

My page tree:

Root
-News (News - List)
--Story (News - Detail)

My realurl configuration

<?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

      ),
    ),
  ),
);

Grateful if anyone could advise on whats missing or wrong with my setup.

1

There are 1 answers

3
René Pflamm On BEST ANSWER

As you configuration

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

says, the Variables for action and controller are passed thru.

Appending an valueMap and noMatch you can delete them:

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

Please be aware that this remove these arguments, on pages where the detail action is not default the news details can not be displayed.