0

我对 realURL 和 extbase 很感兴趣。

列表/详细信息扩展是否有一个简单的解决方案来显示至少有序的 URL,可能形式为

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

“show”和“detail”是动作和控制器,例如

我一直在尝试删除控制器和操作,例如RealURL: Remove Controller and Action from URL中的建议 - 但总是有些东西不起作用。疯狂的。它甚至没有删除 cHash。

我现在的 realurl_conf 是:

<?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
***********************************/
?>
4

1 回答 1

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

于 2015-01-08T19:01:30.177 回答