How to display search results on a new page in Joomla?

灰暗的星星灰暗的星星灰暗的星星灰暗的星星灰暗的星星
 

Many customers ask as how to configure the search module to display search results on completely different page than the search module is assigned to.
Why is it a problem?


For instance, if the search module is displayed on the home page only and there are many modules also assigned to the home page it may be inconvenient for site visitors to use the search module and look through search results among tons of modules :) 

It's all about ItemID.

The key issue is that the seacrh module uses the current menu ItemID unless there is no search component com_search assigned to any menu.
What is ItemID?
Go to Menus -> Your menu to check ItemID of any menu item.
 

menu-itemid


Of course it may be different for you home link. 
So assuming that you've got the searach module on home page, search results page will use home ItemID that you can see in the URL.
 

search-result-url

Tip:
If ItemID does not appear in the URL check if you have disabled SEO Settings -> Search Engine Friendly URLs.
It's recommended to enable this option at the end of working on the site (if you build it from scratch). 

 

Solution.

Edit the search module and navigate Options tab. There's Set ItemID filed that you can use to force search results to be displayed on the new page.
 

Display Search Results on a New Page in Joomla

 

Create hidden menu with the desired ItemID.

Do not have to use your current menu items for search results. You can create the menu that will not be published on the site but it will include the important information - the itemID of com_search component.

Step by step guide:

1. Create the new menu - called "hiddenmenu".

2. Create the new menu item.

3. Choose Search Form or Search Results (display search results) for Menu Item Type.
 

search-results-link


4. Check ItemId for this menu item. 

5. Enter ItemID in the Set ItemId filed.

提交评论


安全码
刷新

 

自1996年以来,公司一直专注于域名注册、虚拟主机、服务器托管、网站建设、电子商务等互联网服务,不断践行"提供企业级解决方案,奉献个性化服务支持"的理念。作为戴尔"授权解决方案提供商",同时提供与公司服务相关联的硬件产品解决方案。
 

联系方式

地址:河南省郑州市经五路2号

电话:0371-63520088 

QQ:76257322

网站:800188.com

电邮:该邮件地址已受到反垃圾邮件插件保护。要显示它需要在浏览器中启用 JavaScript。

微信:用企业微信联系