[英]Extbase: configure controller and action in realURL for detail
我对realURL和extbase很不满意。
是否有一种简单的解决方案,用于列表/详细信息扩展名显示至少有序的URL,可能以以下形式显示
/show/detail/title-of-the-item
“显示”和“细节”是动作和控制器,例如
我一直在尝试删除控制器和操作,例如RealURL中的建议:从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
***********************************/
?>
不是很简单,但至少可以正常工作...
在每一个我转的,我不使用f:link.action
VH,而不是f:link.page
这样你就可以像genearte链接
?id=123&tx_yourext_foo=bar
没有控制器和动作参数,当然,如您所见,很可能需要修改FE插件,才能使用GeneralUtility::_GP('tx_yourext_foo')
读取这些参数,尤其是如果此插件使用的模式多于on模式(动作) )取决于参数
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.