Welcome to the MetaMod and Chameleon Support Forums.

Before posting, please check out the FAQs.

helpme

 

Need extra help with your Joomla site? Consider paid Joomla support by the developer of Chameleon and MetaMod.

 

MetaMod for search results page

MetaMod for search results page

Hi all,

I downloaded MetaMod after searching the Joomla forums for a solution to my problem, which is how to assign modules to non menu item pages, such as the search results page, I landed here: http://forum.joomla.org/viewtopic.php?f … p;t=411530

After downloading MetaMod, I was a little overwhelmed by all of the features, I know this is going to be the strength of the mod once I get to grips with it, but until then, can somebody help me to display a module on the standard Joomla search Results page?

Appreciate any help.

p.s. when posting to the forum, if I don't get the Captcha right, it wipes all my content out and I have to start again.

Thanks
Lee

leewilson78
Beginner Modder
ranks
useravatar
Offline
2 Posts
Administrator has disabled public posting

Re: MetaMod for search results page

Hi Lee,

first of all, sorry about the Captcha. It seems to be an inherent problem with Agora Forums, so I hope they'll release an update that fixes that.

Meanwhile I've turned off the Captcha - I'll only turn it back on again if I see abuse start to happen and I can't control it any other way.

Stephen Brandon
MetaMod / Chameleon developer
If you use MetaMod or Chameleon, please post a rating and a review at the Joomla! Extensions Directory: Chameleon | MetaMod

metamodguy
useravatar
Offline
3314 Posts
User info in posts
Administrator has disabled public posting

Re: MetaMod for search results page

Is your problem is that "using the search module sends people to a page that has no Itemid, so I can't assign modules to that page"?

If so, then you don't need to use MetaMod to fix it:

  • simple create a menu item of type "Search". This doesn't even have to be a menu that you are displaying anywhere. If you need to, just create a new Menu (I have one that I call "Hidden Menu") and on it create a menu item of type "Search".
  • Then, when people use the search module to do a search, the search results page will have the Itemid of the search menu item that you created. And more importantly, you can assign modules to that page.

However there are some other nice tricks you can try, for example putting particular modules on that page when people search on particular keywords, or showing different modules when people click on a menu link for "search" as to when they actually do a search (or search results are showing).

Plain old targeting the search results page - try this rule:

Code:

if ($option == "com_search") return 101;

Target the search page, but only when they clicked on a "Search" menu item and have not actually done a search yet:

Code:

if ($option == "com_search") {

$searchword = JRequest::getVar("searchword");
if ($searchword == "") return 101;
}

Target the search page, but only after they have actually done a search (this doesn't detect whether there were results, just whether they searched for something):

Code:

if ($option == "com_search") {

$searchword = JRequest::getVar("searchword");
if ($searchword != "") return 101;
}

Stephen Brandon
MetaMod / Chameleon developer
If you use MetaMod or Chameleon, please post a rating and a review at the Joomla! Extensions Directory: Chameleon | MetaMod

metamodguy
useravatar
Offline
3314 Posts
User info in posts
Administrator has disabled public posting

Re: MetaMod for search results page

Thanks for the great support, I do actually use the hidden menu technique for similar problems, I didn't know it could be done for the search page, will try that out.

I would like to get my hands dirty with MetaMod, it looks like a very powerful module.

Thanks
lee

leewilson78
Beginner Modder
ranks
useravatar
Offline
2 Posts
Administrator has disabled public posting

Board Info

Board Stats:
 
Total Topics:
1691
Total Polls:
6
Total Posts:
5912
Total Posts Today:
6
User Info:
 
Total Users:
11527
Newest User:
david9684
Members Online:
1
Guests Online:
189

Online: 
david9684

Forum Legend:

 Topic
 New
 Locked
 Sticky
 Active
 New/Active
 New/Locked
 New Sticky
 Locked/Active
 Active/Sticky
 Sticky/Locked
 Sticky/Active/Locked