简体   繁体   English

Joomla 2.5自定义搜索页面,显示模块

[英]Joomla 2.5 Custom Search Page, Display modules

I literally been to page 18 of Google, Anyways, All I need to do is create a custom search results page, where you can assign specific modules to it. 我确实访问过Google的第18页,无论如何,我要做的就是创建一个自定义搜索结果页,您可以在其中分配特定的模块。

Using Universal Live Ajax search module 使用Universal Live Ajax搜索模块

Because if the modules aren't set to "display on all pages" it doesn't show on the search results page. 因为如果未将模块设置为“在所有页面上显示”,则模块不会显示在搜索结果页面上。

Any help greatly appreciated. 任何帮助,不胜感激。

The reason modules do not display when you not set pages option to "display on all pages" or to specific pages because you dont have itemid on that perticular page.You can create a menu for the component and than assign modules to this menu.Create a hidden field in the search form for itemid if it's not there and set itemid value in the field. 当您未将页面选项设置为"display on all pages"specific pages时,模块不会显示的原因是,在该特定页面上没有itemid 。您可以为组件创建菜单,然后将模块分配给该菜单。如果itemid不在搜索表单中的隐藏字段中,请在该字段中设置itemid值。

Hope this will help. 希望这会有所帮助。

Well after looking at normal search and universal live Ajax search.. there is a parameter missing from universal live Ajax search, which links it to the custom search page made... 在查看普通搜索和通用实时Ajax搜索之后,..通用实时Ajax搜索中缺少一个参数,该参数将其链接到所创建的自定义搜索页面上。

The standard search has the parameter of "Itemid" and universal live Ajax search doesn't, so temporarily i hard-coded my hidden search pages item id in Ajax search, by adding the following line of code: 标准搜索的参数为“ Itemid”,而通用实时Ajax搜索则没有,因此我通过添加以下代码行,在Ajax搜索中暂时对隐藏的搜索页面项ID进行了硬编码:

<input type="hidden" name="Itemid" value="THE ID OF YOUR HIDDEN MENU ITEM HERE" />

underneath line 188 this line, <input type="hidden" name="option" value="com_search" /> in joomlasite/modules/mod_universal_ajaxlivesearch/mod_universal_ajaxlivesearch.php 在第188行下面,在joomlasite / modules / mod_universal_ajaxlivesearch / mod_universal_ajaxlivesearch.php中, <input type="hidden" name="option" value="com_search" />

Thanks anyway. 不管怎么说,还是要谢谢你。 :) :)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM