0

I'm going nuts with realURL and extbase.

Is there a simple solution for a list/detail extension to display URLs that are at least orderly, maybe in the form of

/show/detail/title-of-the-item

"show" and "detail" being action and controller, e.g.

I've been trying to remove controller and action, for example as suggested in RealURL: Remove Controller and Action from URL - but there's always something not working. Crazy. It's not even removing the cHash.

My realurl_conf at the moment is:

<?php

$TYPO3_CONF_VARS['EXTCONF'] ['realurl'] ['_DEFAULT'] = getRealURL('1');


function getRealURL($root)
{
    return array(
        'init' => array(
            'appendMissingSlash' => 'ifNotFile',
            'enableUrlDecodeCache' => 1,
            'enableCHashCache' => 1,
            'enableUrlEncodeCache' => 1,
            'respectSimulateStaticURLs' => 0,
           'postVarSet_failureMode'=>'redirect_goodUpperDir',

        ),
    'redirects_regex' => array (

    ),
    'preVars' => array(
                        array(
                             'GETvar' => 'L',
                             'valueMap' => array(
                                                'de' => '0',
                                                'fr' => '1',
                                        ),
                             'valueDefault' => 'de',
                             'noMatch' => 'bypass',
                        ),
                      array(
                                'GETvar' => 'no_cache',
                                'valueMap' => array(
                                    'no_cache' => 1,
                                ),
                                'noMatch' => 'bypass',
                        ),
                ),
     'pagePath' => array(
            'type' => 'user',
            'userFunc' => 'EXT:realurl/class.tx_realurl_advanced.php:&tx_realurl_advanced->main',
            'spaceCharacter' => '-',
            'languageGetVar' => 'L',
            'expireDays' => 7,
            'rootpage_id' => 1,
        ),


         'postVarSets' => array(
            '_DEFAULT' => array(
                'wb' => array(
                    array(
                        'GETvar' => 'tx_weiterbildung_pi1[item]' ,
                        'lookUpTable' => array(
                            'table' => 'tx_weiterbildung_domain_model_item',
                            'id_field' => 'uid',
                            'alias_field' => 'kurs_titel',
                            'addWhereClause' => ' AND NOT deleted',
                            'useUniqueCache' => 1,
                            'useUniqueCache_conf' => array(
                                'strtolower' => 1,
                                'spaceCharacter' => '-',
                            ),
                        ),
                    ),
                ),
            ),
        ),

      'fileName' => array(
            'defaultToHTMLsuffixOnPrev'=>0,
            'index' => array(
                'rss.xml' => array(
                    'keyValues' => array(
                        'type' => 100,
                    ),
                ),
                'rss091.xml' => array(
                    'keyValues' => array(
                        'type' => 101,
                    ),
                ),
                'rdf.xml' => array(
                    'keyValues' => array(
                        'type' => 102,
                    ),
                ),
                'atom.xml' => array(
                    'keyValues' => array(
                        'type' => 103,
                    ),
                ),
            ),
        ),
 );
}
/**********************************
REALURL end
***********************************/
?>
Community
  • 1
  • 1
Urs
  • 4,984
  • 7
  • 54
  • 116

1 Answers1

1

Not quite simple, but at least working...

In EVERY of my ext I DO NOT use f:link.action VH, instead f:link.page so you can genearte links like

?id=123&tx_yourext_foo=bar

Without controller and action params, of course as you can see most probably you'll need to modify your FE plugins, to read these params with GeneralUtility::_GP('tx_yourext_foo'), especially if this plugin uses more than on mode (action) depending on params

biesior
  • 55,576
  • 10
  • 125
  • 182
  • You're probably right! I was just tired. I'm going to post a controller class I'm using on http://stackoverflow.com/questions/26142614/realurl-remove-controller-and-action-from-url, maybe you can say something about the difference – Urs Jan 08 '15 at 19:20
  • That is just not the answer to the Question. You are avoiding the Problem instead of solving it. In fact he doesnt include the Controller and Action to the config. This means he simply doesnt touch them. As far as I know you usualy can include the GETvar Controller and Action. You are now at least bypass the Controller and are left with postVarSet key, action and item name. – Panade Oct 02 '15 at 06:40