How to Prevent Modules Being Loaded in Search Results Page
Moderator: General Support Moderators
Forum rules
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting, this means YOU.
Forum Post Assistant - If you are serious about wanting help, you will use this tool to help you post.
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting, this means YOU.
Forum Post Assistant - If you are serious about wanting help, you will use this tool to help you post.
-
- Joomla! Enthusiast
- Posts: 215
- Joined: Fri Feb 17, 2006 5:32 pm
How to Prevent Modules Being Loaded in Search Results Page
Joomla 1.0.15
Mambots option in module parameters are set to NO for all modules but all frontpage modules are loading in the search results page.
How can I prevent them from being loaded?
Mambots option in module parameters are set to NO for all modules but all frontpage modules are loading in the search results page.
How can I prevent them from being loaded?
-
- Joomla! Enthusiast
- Posts: 102
- Joined: Thu Dec 25, 2008 8:05 am
Re: How to Prevent Modules Being Loaded in Search Results Page
could you please elaborate you question? It's somewhat confusing. What do you mean by "all frontpage modules"?
-
- Joomla! Enthusiast
- Posts: 215
- Joined: Fri Feb 17, 2006 5:32 pm
Re: How to Prevent Modules Being Loaded in Search Results Page
I mean all modules that are loaded on the frontpage (home page of the web site).
-
- Joomla! Intern
- Posts: 81
- Joined: Tue Sep 05, 2006 10:25 pm
Re: How to Prevent Modules Being Loaded in Search Results Page
Is your problem solved?
-
- Joomla! Apprentice
- Posts: 17
- Joined: Thu Nov 13, 2008 9:54 am
Re: How to Prevent Modules Being Loaded in Search Results Page
Hi sural98
I am not aware joomla has that option. But for search engine's you can give a commant by Robots(google it and see the options and ways). Robots is the file you will mention all the url which your not willing to display in search.
Thanks
Raj
I am not aware joomla has that option. But for search engine's you can give a commant by Robots(google it and see the options and ways). Robots is the file you will mention all the url which your not willing to display in search.
Thanks
Raj
Cheers!
Raj
Raj
-
- Joomla! Intern
- Posts: 81
- Joined: Tue Sep 05, 2006 10:25 pm
Re: How to Prevent Modules Being Loaded in Search Results Page
I think he means that...well kinda hard to explain...Let's say I have a google search module on my home page. Plus, there are 3-4 modules on left and right columns, like, latest news, or something. When I type my keyword and hit the "Search" button it will open a new page with the search results in between 2 columns with modules. What if I want that search results page be all search results and don't want the modules on left and right columns to show. I mean to disable the modules on search results page.
-
- Joomla! Enthusiast
- Posts: 102
- Joined: Thu Dec 25, 2008 8:05 am
Re: How to Prevent Modules Being Loaded in Search Results Page
The first thing you need to know is that modules can be displayed or hide when they are assigned to menu items. (ie if they have ItemId).
In case of search results, the search results are displayed without an item id. That is the reason why your modules are showing up on front page even if they are set to NO.
If you have some coding knowledge you can edit the com_search component and hard code the itemid.
In case of search results, the search results are displayed without an item id. That is the reason why your modules are showing up on front page even if they are set to NO.
If you have some coding knowledge you can edit the com_search component and hard code the itemid.
-
- Joomla! Intern
- Posts: 67
- Joined: Fri Mar 13, 2009 12:54 pm
Re: How to Prevent Modules Being Loaded in Search Results Page
Has anyone found a solution to this?
-
- Joomla! Intern
- Posts: 81
- Joined: Tue Sep 05, 2006 10:25 pm
Re: How to Prevent Modules Being Loaded in Search Results Page
I have several modules and menu on my frontpage, and when I do search none of the modules show up on search page at all. It used to back 5 months ago. Since then I don't have this problem anymore. Maybe I fixed it, I don't know what I did, I forgot! Maybe it was fixed by itself... LOL But I will post it as soon as I remember what I did to solve this problem.
-
- Joomla! Intern
- Posts: 81
- Joined: Tue Sep 05, 2006 10:25 pm
Re: How to Prevent Modules Being Loaded in Search Results Page
Choose a module and choose menu assignment and choose te option: Select Menu Item(s) from the List and choose menu pages. That way it will limit the module being shown on search pages. If you choose "All" than it will show up in search results page. So, you have too choose which pages the module should appear and which pages not. In short, try not using the "All" use the "Select Menu Item(s) from the List" instead and test the search results page. Let me know if it worked. By the way, don't forget about clearing the cache and stuff, they might confuse you.ktsixit wrote:Has anyone found a solution to this?
-
- Joomla! Intern
- Posts: 67
- Joined: Fri Mar 13, 2009 12:54 pm
Re: How to Prevent Modules Being Loaded in Search Results Page
Thank you so much for your replies. I found a similar solution to this issue. This is what I did
1. Go to Menu Manager and create a new Menu.
2. Create a new Menu Module and assign it to the Menu you have created. (Module Parameters>Menu Name). Keep this module NOT enabled.
3. Add a new menu item to your menu. Choose the Search menu Type for it. Save it.
4. After you have created the search menu type item, go to Menu Item's edit page and copy the Link.
5. Paste this Link into the file /httpdocs/modules/mod_search/tmpl/default.php
line 3, replace:
<form action="index.php" method="post">
with this
<form action="menu_item_copied_link" method="post">
It's working ok till now and I am very pleased with that. Thank you again
1. Go to Menu Manager and create a new Menu.
2. Create a new Menu Module and assign it to the Menu you have created. (Module Parameters>Menu Name). Keep this module NOT enabled.
3. Add a new menu item to your menu. Choose the Search menu Type for it. Save it.
4. After you have created the search menu type item, go to Menu Item's edit page and copy the Link.
5. Paste this Link into the file /httpdocs/modules/mod_search/tmpl/default.php
line 3, replace:
<form action="index.php" method="post">
with this
<form action="menu_item_copied_link" method="post">
It's working ok till now and I am very pleased with that. Thank you again
-
- Joomla! Enthusiast
- Posts: 102
- Joined: Thu Dec 25, 2008 8:05 am
Re: How to Prevent Modules Being Loaded in Search Results Page
Guys,
I've created a movie explaining the process of hiding modules on search page. It's an swf file and following are the links-
http://rapidshare.com/files/225616244/H ... e.swf.html
http://www.filepub.com/public/viewset/26013
http://uploading.com/files/3RD1XL4A/Hiding modules on search page.zip.html
You need to really excuse me 'cos the movie doesn't have an audio. (I don't have a mic. to record).
cheers,
sashi
I've created a movie explaining the process of hiding modules on search page. It's an swf file and following are the links-
http://rapidshare.com/files/225616244/H ... e.swf.html
http://www.filepub.com/public/viewset/26013
http://uploading.com/files/3RD1XL4A/Hiding modules on search page.zip.html
You need to really excuse me 'cos the movie doesn't have an audio. (I don't have a mic. to record).
cheers,
sashi
- jwestley
- Joomla! Apprentice
- Posts: 17
- Joined: Wed Nov 21, 2007 12:45 am
- Location: San Francisco, California, USA
- Contact:
Re: How to Prevent Modules Being Loaded in Search Results Page
Thanks a bunch ktsixit, this saved my butt to finish a project and thought it was the Template I was working with...
- jossi
- Joomla! Apprentice
- Posts: 25
- Joined: Fri Mar 06, 2009 7:21 pm
Re: How to Prevent Modules Being Loaded in Search Results Page
I need to do the opposite: I want to display selected modules in the search results page.
I have created a menu item (on a menu that I am not using) of type search, and in module manager I have assigned certain modules to load on that page, but nothing is showing in the results page, besides the hardcoded stuff on my template.
I have created a menu item (on a menu that I am not using) of type search, and in module manager I have assigned certain modules to load on that page, but nothing is showing in the results page, besides the hardcoded stuff on my template.
-- Jossi
http://emandtee.com/blog/
Signature rules: Literal URLs only - http://forum.joomla.org/viewtopic.php?f=8&t=65
http://emandtee.com/blog/
Signature rules: Literal URLs only - http://forum.joomla.org/viewtopic.php?f=8&t=65
- kane738
- Joomla! Apprentice
- Posts: 28
- Joined: Mon Oct 02, 2006 2:48 pm
- Location: UK
- Contact:
Re: How to Prevent Modules Being Loaded in Search Results Page
me too! cheers :-)jwestley wrote:Thanks a bunch ktsixit, this saved my butt to finish a project and thought it was the Template I was working with...
- rubira
- Joomla! Apprentice
- Posts: 8
- Joined: Tue Jun 09, 2009 6:44 am
Re: How to Prevent Modules Being Loaded in Search Results Page
In Joomla 1.5.11, I opening controller.php found in >>components>com_search and replace line 67 from this:
...into this:
It works for me.. cheers
Code: Select all
// No need to guess Itemid if it's already present in the URL
if (JRequest::getInt('Itemid') > 0) {
$post['Itemid'] = JRequest::getInt('Itemid');
} else {
// set Itemid id for links
$menu = &JSite::getMenu();
$items = $menu->getItems('link', 'index.php?option=com_search&view=search');
if(isset($items[0])) {
$post['Itemid'] = $items[0]->id;
}
}
Code: Select all
$menu = &JSite::getMenu();
$items = $menu->getItems('link', 'index.php?option=com_search&view=search');
if(isset($items[0])) {
$post['Itemid'] = $items[0]->id;
}
It works for me.. cheers
-
- Joomla! Apprentice
- Posts: 10
- Joined: Tue Feb 03, 2009 2:20 pm
Re: How to Prevent Modules Being Loaded in Search Results Page
Thanks rubira, that works just fine
-
- Joomla! Apprentice
- Posts: 18
- Joined: Tue Jun 20, 2006 4:25 pm
Re: How to Prevent Modules Being Loaded in Search Results Page
Thank you very much ktsixit. Works perfect!
-
- Joomla! Fledgling
- Posts: 4
- Joined: Thu Mar 19, 2009 10:52 pm
Re: How to Prevent Modules Being Loaded in Search Results Page
Thank you rubira sooooo very much! That just saved me from a lot of work!!!
- Chacapamac
- Joomla! Ace
- Posts: 1088
- Joined: Wed Feb 20, 2008 6:50 am
- Location: Canada, Montreal
- Contact:
Re: How to Prevent Modules Being Loaded in Search Results Page
Thanks rubira work on 1.5.14
Can we have some kind of control on that... I find that totally crappy that an important core function like search cannot have more control, only with hacking.... Crap!
If I want certain module to appear?????
I see that aticles that appear in a directory when search and click appear outside the directory itself. I will prefer that they appear in context... Any idea....
URL of the article with the Joomla search:
http://www.editionzoneshockey.com/ezh/i ... is&lang=fr
URL of the article in the directory:
http://www.editionzoneshockey.com/ezh/i ... 37&lang=fr
Can we have some kind of control on that... I find that totally crappy that an important core function like search cannot have more control, only with hacking.... Crap!
If I want certain module to appear?????
I see that aticles that appear in a directory when search and click appear outside the directory itself. I will prefer that they appear in context... Any idea....
URL of the article with the Joomla search:
http://www.editionzoneshockey.com/ezh/i ... is&lang=fr
URL of the article in the directory:
http://www.editionzoneshockey.com/ezh/i ... 37&lang=fr
-
- Joomla! Apprentice
- Posts: 5
- Joined: Fri Mar 26, 2010 1:40 pm
Re: How to Prevent Modules Being Loaded in Search Results Page
Just want to add my thanks to rubira. Worked for me (after clearing cache) so I'm very happy
-
- Joomla! Apprentice
- Posts: 45
- Joined: Sun Dec 04, 2005 11:09 pm
Re: How to Prevent Modules Being Loaded in Search Results Pa
Unfortunately, this solution completely trims out those modules appearing in selected categories.rubira wrote:In Joomla 1.5.11, I opening controller.php found in >>components>com_search and replace line 67 from this:
...into this:Code: Select all
// No need to guess Itemid if it's already present in the URL if (JRequest::getInt('Itemid') > 0) { $post['Itemid'] = JRequest::getInt('Itemid'); } else { // set Itemid id for links $menu = &JSite::getMenu(); $items = $menu->getItems('link', 'index.php?option=com_search&view=search'); if(isset($items[0])) { $post['Itemid'] = $items[0]->id; } }
Code: Select all
$menu = &JSite::getMenu(); $items = $menu->getItems('link', 'index.php?option=com_search&view=search'); if(isset($items[0])) { $post['Itemid'] = $items[0]->id; }
It works for me.. cheers
-
- Joomla! Fledgling
- Posts: 3
- Joined: Fri Aug 01, 2008 9:15 am
Re: How to Prevent Modules Being Loaded in Search Results Pa
I used the "menu method" for the standard joomla search and it worked fine.
Is there a chance i somehow can eliminate such modules using Custom Properties Search and Pix Search, because the "menu method' is not working with this search modules.
Is there a chance i somehow can eliminate such modules using Custom Properties Search and Pix Search, because the "menu method' is not working with this search modules.
-
- Joomla! Apprentice
- Posts: 5
- Joined: Tue Mar 24, 2009 11:22 am
Re: How to Prevent Modules Being Loaded in Search Results Pa
you don't need to do all that
Edit the third line of this file joomla\modules\mod_search\tmpl\default.php
this
<form action="index.php" method="post">
into this
<form action="index.php?option=com_search" method="post">
regards
kirk
***** Manual signatures are NOT allowed ********** Manual signatures are NOT allowed *****_
the above is true for joomla 1.5.x
Edit the third line of this file joomla\modules\mod_search\tmpl\default.php
this
<form action="index.php" method="post">
into this
<form action="index.php?option=com_search" method="post">
regards
kirk
***** Manual signatures are NOT allowed ********** Manual signatures are NOT allowed *****_
the above is true for joomla 1.5.x
-
- Joomla! Apprentice
- Posts: 33
- Joined: Fri Apr 23, 2010 7:10 pm
Re: How to Prevent Modules Being Loaded in Search Results Pa
I have this issue in 1.5.2
I've tried beipink's solutiion and the one posted above and the code on the higher up post here is not the same as mine. Still looking for a solution.
I've tried beipink's solutiion and the one posted above and the code on the higher up post here is not the same as mine. Still looking for a solution.
-
- Joomla! Apprentice
- Posts: 6
- Joined: Fri Jan 07, 2011 8:12 pm
Re: How to Prevent Modules Being Loaded in Search Results Pa
ex19 wrote:I have this issue in 1.5.2
I've tried beipink's solutiion and the one posted above and the code on the higher up post here is not the same as mine. Still looking for a solution.
I have the same problem. Can not find the solution and it stopped my project
sural98, did you find the way to deal with that? Please help.
-
- Joomla! Apprentice
- Posts: 33
- Joined: Fri Apr 23, 2010 7:10 pm
Re: How to Prevent Modules Being Loaded in Search Results Pa
in my case I had the newsflash being called onto the home page in the top position. It was enabled only for Home, but was showing in search. I removed newsflash and disabled it, just organized the front page differently.
-
- Joomla! Apprentice
- Posts: 6
- Joined: Fri Jan 07, 2011 8:12 pm
Re: How to Prevent Modules Being Loaded in Search Results Pa
I see.
I need to load some modules to search page as now it appears only with the search results.
I need to load some modules to search page as now it appears only with the search results.
-
- Joomla! Fledgling
- Posts: 3
- Joined: Mon Apr 13, 2009 9:51 pm
Re: How to Prevent Modules Being Loaded in Search Results Pa
Go to the file:
joomla\modules\mod_search\tmpl\default.php
Change:
to:
It works for me...
joomla\modules\mod_search\tmpl\default.php
Change:
Code: Select all
<form action="index.php" method="post">
Code: Select all
<form action="index.php?option=com_search&view=search" method="post">
- xiangdian
- Joomla! Apprentice
- Posts: 8
- Joined: Thu Sep 10, 2009 12:50 am
- Location: Beijing, China
- Contact:
Re: How to Prevent Modules Being Loaded in Search Results Pa
I tried almost all solutions mentioned above, only rubira's works for my site. 1.5.12. Thanks a lot!