mojoBlog Itemid Over-riding Search Itemid

I’ve been working on a new website for Vermonters for a Clean Environment and came across an odd bug within the search bot for mojoBlog. Essentially, I wanted to add an Itemid to the search results from the default Joomla search module so that the results would not default to the home page’s Itemid. The new home page will have a large image on the top and some other “news” modules and the search results would get buried below the fold perhaps.

I’ve also added mojoBlog to the new site and discovered that if I used the “Set Itemid” feature in the Search module, the main menu tab for mojoBlog also became active along with whatever other Itemid I had selected.

setitemid.png

To fix this bug, I went into the mojo.searchbot.php file within /mambots/search and edited one line. Look for function botSearchwordpress. On the following line is a global declaration of variables and at the end of that line is one for Itemid. Remove the reference to Itemid — it’s simply not needed. Your new line should look like this:

global $mosConfig_sef, $mosConfig_absolute_path, $mosConfig_absolute_path, $my, $database, $mosConfig_offset;

That fixes the override of the specified Search Itemid.

September 2008
Mo Tu We Th Fr Sa Su
« Jul   Oct »
1234567
891011121314
15161718192021
22232425262728
2930  

Blogroll

Search

LinkedIn

View Drew Story's LinkedIn profileView Profile

Giving Back

We donate a portion of all of our sales to environmental causes.  Learn more about how we give back and use our work for a better world.

Our Clients

View Client List

Testimonials

“Drew is thoroughly professional, well spoken, and well informed. His attention to detail and helpful nature have always made working with him a great experience, and he brings a wealth of knowledge and value to Patagonia.”

- Mark Morgan

Consultant & Sr. Programmer 

 

Login






Lost Password?
No account yet? Register

Translate

Current Projects

- Improvements to Joomla Component - Advocacy 2.0
- New Joomla site for VCE.org
- A website for author Lee Green
- A website for MDH Skincare
- Updates to RestorativeJusticeNow.org

Site Summary

The Design Mission are web developers specializing in Open Source software, particularly Joomla, osCommerce, phpCollab and Gallery2. We can also create custom solutions upon request.

Other areas of expertise include search engine optimization, newsletter marketing, graphical user interface (GUI) design and information architecture.

The Design Mission's web design and development process will make the Internet work for you.