Remove: Categories & Sections appear in Search results

Everything to do with Joomla! 1.5 templates and templating.

Moderator: General Support Moderators

Forum rules
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting, this means YOU.
Locked
babylonia_steve
Joomla! Apprentice
Joomla! Apprentice
Posts: 41
Joined: Wed Oct 22, 2008 8:50 am

Remove: Categories & Sections appear in Search results

Post by babylonia_steve » Mon Apr 27, 2009 10:44 am

Listings for Categories & Sections appear in the Search results of my Joomla site. I want to remove these 2 from the results. How would I do this?

User avatar
ioanna
Joomla! Explorer
Joomla! Explorer
Posts: 305
Joined: Thu Apr 09, 2009 1:39 pm

Re: Remove: Categories & Sections appear in Search results

Post by ioanna » Wed May 13, 2009 11:18 am

Hello,

to remove them you have to disable the search-category and search-section plug-ins.
English is not my native language... please be nice
Read the tooltips - useful info
I love Firebug!

babylonia_steve
Joomla! Apprentice
Joomla! Apprentice
Posts: 41
Joined: Wed Oct 22, 2008 8:50 am

Re: Remove: Categories & Sections appear in Search results

Post by babylonia_steve » Wed May 13, 2009 2:55 pm

Thanks for that. That was just what I needed to know. :)

eyedoll
Joomla! Apprentice
Joomla! Apprentice
Posts: 7
Joined: Fri Apr 17, 2009 12:18 am

Re: Remove: Categories & Sections appear in Search results

Post by eyedoll » Fri Aug 14, 2009 9:22 pm

Hello.
I have the same issue: i would like to remove the article section and category from joomla search results. I disabled all the search plugins excepting the search content one and still the article section and category appears in search results. Any other ideas? I'm using Joomla 1.5.14.
Thank you!

TinaFitz
Joomla! Fledgling
Joomla! Fledgling
Posts: 3
Joined: Wed Sep 30, 2009 8:18 pm

Re: Remove: Categories & Sections appear in Search results

Post by TinaFitz » Thu Oct 01, 2009 11:47 pm

I have the same issue as eyedoll after doing all the recommendations. I am using 1.5.11.
Any other ideas or response somewhere?

rsvp
Joomla! Fledgling
Joomla! Fledgling
Posts: 3
Joined: Thu Sep 21, 2006 1:47 am

Re: Remove: Categories & Sections appear in Search results

Post by rsvp » Sun Nov 15, 2009 6:23 pm

Hi,

I found that disabling the plugins did absolutely nothing. Search results were presented exactly the same after disabling the plugins as they were before.

I'm not a coder, so this probably isn't the most elegant way to approach the problem, but here's what I did to remove Categories and Sections from Search results.

I'm running Joomla version 1.5.10.


1) First, I found the file:

templates\[your template name]\html\com_search\search\default_results.php

I removed the following code:

Code: Select all

			<?php if ($result->section) : ?>
			<p><?php echo JText::_('Category') ?>:
				<span class="small">
					<?php echo $this->escape($result->section); ?>
				</span>
			</p>
			<?php endif; ?>
This removed Categories and Sections from the Search results successfully, but not from the dropdown menu "Ordering".


2) Then I found the file:

components\com_search\views\search\view.html.php

I removed the following code from this file:

Code: Select all

		$orders[] = JHTML::_('select.option',  'category', JText::_( 'Section/Category' ) );
Categories and Sections no longer shows up as an option in the Ordering dropdown menu.


In both instances, I saved the code I removed (and the 'path' to where I found the files initially) in a Notepad document and placed it in a folder I named Source Code Changes on my workstation.

If, for any reason, I ever need to reinstate the code, or if it causes problems, it's nice to have these Notepad documents to be able to refer to. (It is also very useful for those of us with short-term attention spans) ;)


Note: If you at some point decide to change templates you will probably have to follow step 1 again for a given template.

Addendum: Just noticed that the Categories and Sections checkboxes still show up at the bottom of the Search results page under Search Only. Disabling the plugins for Categories and Sections should make these go away.

Hope this was helpful.

videovic
Joomla! Apprentice
Joomla! Apprentice
Posts: 15
Joined: Fri Jun 15, 2007 7:38 pm
Location: Toronto Canada

Remove: Categories & Sections checkboxes in search results

Post by videovic » Sun Nov 21, 2010 9:08 pm

thanks for the info so far everyone.

However.... I want to only get rid of the checkboxes on the advanced search form and keep the results as they are , as well as have the option to re-order by section or category.

i don't want to turn the plugins for section and category off.

is this possible?

THANKS IN ADVANCED

PEACE.

djacouma
Joomla! Apprentice
Joomla! Apprentice
Posts: 44
Joined: Thu Jun 17, 2010 1:49 pm

Re: Remove: Categories & Sections appear in Search results

Post by djacouma » Wed Dec 08, 2010 2:52 am

Am facing a similar issue and need to remove some of the checkboxes and customize others. \

Right now I have:
Blogs / DOCman / JEvents / Forums / Pictures / Members / Groups / Articles / Web Links / Contacts Categories / Sections / News Feeds

And really just want the search options to be something along the lines of:
Articles / Photos / Blogs / Posts / Events / Users / Groups / Files

And ideally I could find a way to split documents into two different buttons (docman subcategories).

If anyone can clue me in, or point me to a post with helpful info, would be most appreciative!

~Dja

User avatar
uglyviki
Joomla! Apprentice
Joomla! Apprentice
Posts: 25
Joined: Thu Sep 17, 2009 7:41 am
Location: Kathmandu, Nepal.
Contact:

Re: Remove: Categories & Sections appear in Search results

Post by uglyviki » Fri Feb 22, 2013 9:55 am

Disabling search-categories plugin solved my problem in j2.5, Thanks :)


Locked

Return to “Templates for Joomla! 1.5”