我正在使用 TYPO3 6.2.0。我为新闻创建了一个表单搜索,代码如下:
<f:form object="{search}" name="search" pageUid="{settings.listPid}" method="get">
<fieldset>
<label for="recherche" class="hors-champ">{f:translate(key:'search-texte-label')}</label>
<f:form.textfield property="subject" class="text-search" id="recherche"/>
<label for="recherche" class="hors-champ">{f:translate(key:'search-Categorie-label')}</label>
<f:cObject typoscriptObjectPath="lib.bouton_select_news" />
<span></span>
<f:form.submit value="{f:translate(key:'search-start')}" class="bt-search"/>
</fieldset>
</f:form>
问题是每次执行表单时,我都会被重定向到主页,即使表单的操作包含良好的价值:
<form method="get" name="search" action="index.php?id=56&tx_news_pi1%5Bcontroller%5D=News&cHash=d4f1472e52ea8a990f34bb9ad93a3b9f">
我有一个小问题的解决方案,当我在表单中添加一个隐藏字段 id 时:
<input type="hidden" name="id" value="{settings.listPid}" />
但是,为什么在其他站点中,我有完全相同的代码而没有我刚才提到的隐藏字段,并且它可以工作?
谢谢