How to Customize Smart Search Results

General questions relating to Joomla! 3.x.

Moderator: General Support Moderators

Forum rules
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting.
Forum Post Assistant - If you are serious about wanting help, you should use this tool to help you post.
Windows Defender SmartScreen Issues <-- please read this if using Windows 10
Locked
Dano0
Joomla! Apprentice
Joomla! Apprentice
Posts: 9
Joined: Thu Aug 21, 2014 1:52 am

How to Customize Smart Search Results

Post by Dano0 » Thu Aug 21, 2014 2:19 am

Hi Joomla Buddies,

I hope somebody can help me. I want to customise the search results on my joomla website in order to achieve the following:

OBJECTIVE = If a user perform a search all the content found will be display on search results (no previous click on a particular element)
- This mean I want to display the articles content directly on after the other. without any previous click.

CONTEXT = The articles I'm filtering for the smart search will contain only images, so the idea is to show directly the images found with the keyword typed. Like when we do a "image search" in google.

Maybe there's another way to achieve the same, if so I'm all ears (eyes in this case).

itoctopus
Joomla! Virtuoso
Joomla! Virtuoso
Posts: 4025
Joined: Mon Nov 25, 2013 4:35 pm
Location: Montreal, Canada
Contact:

Re: How to Customize Smart Search Results

Post by itoctopus » Thu Aug 21, 2014 2:25 am

You just need to modify the template for the search results. You will need to modify to override the components/com_search/views/tmpl/default_results.php file to display everything (you will need to also add $result->introtext to the code).
http://www.itoctopus.com - Joomla consulting at its finest
https://twitter.com/itoctopus - Follow us on Twitter

Dano0
Joomla! Apprentice
Joomla! Apprentice
Posts: 9
Joined: Thu Aug 21, 2014 1:52 am

Re: How to Customize Smart Search Results

Post by Dano0 » Fri Aug 22, 2014 6:08 am

Thanks a lot Itoctopus! But I don't think I can do it without a Tutorial. I know something of programming but I'm not an expert.

I will google for this, but if you have some link to recommend is always welcome!!

Best Regards!

Dano0
Joomla! Apprentice
Joomla! Apprentice
Posts: 9
Joined: Thu Aug 21, 2014 1:52 am

Re: How to Customize Smart Search Results

Post by Dano0 » Mon Aug 25, 2014 3:28 am

Anyone can help me a bit more? I've found the file to modify but not sure how to do it.

Not sure but this part seems to be the one that display the results:

Code: Select all

<br id="highlighter-start" />
	<ul class="search-results<?php echo $this->pageclass_sfx; ?> list-striped">
		<?php
		for ($i = 0, $n = count($this->results); $i < $n; $i++):
			$this->result	= &$this->results[$i];
			$layout			= $this->getLayoutFile($this->result->layout);
		?>
		<?php echo $this->loadTemplate($layout); ?>
		<?php
		endfor;
		?>
I need to change this so the articles inside every category found are display on after the other.

Dano0
Joomla! Apprentice
Joomla! Apprentice
Posts: 9
Joined: Thu Aug 21, 2014 1:52 am

Re: How to Customize Smart Search Results

Post by Dano0 » Sat Aug 30, 2014 5:05 am

Anyone? :/


Locked

Return to “General Questions/New to Joomla! 3.x”