1
我有一个看起来像这样的URL:TYPO3 RealURL postVarSets隐藏关键字
http://domain.com/leistungen/industrial-design/?tx_fsproject_fsprojectfp%5Bproject%5D=2&tx_fsproject_fsprojectfp%5Baction%5D=show&tx_fsproject_fsprojectfp%5Bcontroller%5D=Project&cHash=7c405bcde49853af9a7e78bdf465002c
使用RealURL具有以下配置(以及一些钩子函数的解释here):我得到一个
'postVarSets' => array(
'_DEFAULT' => array(
// projects
'industrial-design' => array(
array(
'GETvar' => 'tx_fsproject_fsprojectfp[controller]',
),
array(
'GETvar' => 'tx_fsproject_fsprojectfp[action]',
),
array(
'GETvar' => 'tx_fsproject_fsprojectfp[project]',
'lookUpTable' => array(
'table' => 'tx_fsproject_domain_model_project',
'id_field' => 'uid',
'alias_field' => 'title',
'addWhereClause' => ' AND deleted !=1 AND hidden !=1',
'useUniqueCache' => 1,
'useUniqueCache_conf' => array(
'strtolower' => 1,
'spaceCharacter' => '-',
)
)
),
),
),
),
URL看起来像这样:
http://domain.com/leistungen/industrial-design/industrial-design/projekt/project-b/
这并不坏。但是,为什么industrial-design/
部分显示两次?
'fixedPostVarSets'完成了这项工作。感谢你们俩。 –
我很好奇......我找不到有关'fixedPostVarSets'的文档或如何使用它。所有在线示例仅将其作为空数组。如果你是谷歌,你只能在这里找到这个职位。它是否像'postVarSets'一样使用页面ID而不是'_DEFAULT',或者页面ID而不是postVar关键字? – slhck
@slhck:S ***!对不起。我现在意识到它应该是'fixedPostVars'。在写我的答案时,由于RealURL的混合命名:'postVarSets' VS'preVars','fixedPostVars',我输入错误。我不敢相信这个错误留在了这么久的答案中。感谢您指出! – tmt