我想在标题顶部有一个搜索框,但是当我提交关键字时,我不希望结果出现在标题上,而是出现在正文上。
为此,我认为 id 在页眉中有一个插件,在一个特殊的“搜索”页面的正文中有另一个插件,当用户使用此页面时,我可以在页眉中隐藏 from。但我不知道该怎么做,以便在搜索完成后跳转到另一个页面。(有点像 tt_news 有一个从 LIST 到 SINGLE 的 pid)
我该怎么做才能做到这一点?或者也许有更简单的方法来实现我想要的?
On common pages you need to construct "pure html" in the header part with the search form where its action is link to the another page - displaying search results. It uses typolink
for generating proper form's action.
On the page with search results you don't need to hide the search form, instead you can use TypoScript to fill the search field with value entered on the common page.
There is ready-to-use
sample of TypoScript for such scenario placed in Introduction Package
, I don't use it so sorry, but I won't paste it here. Anyway you can install it locally and dig for nice snippets and techniques.