multiSearch.php results page

6 posts by 2 authors in: Forums > CMS Builder
Last Post: January 30, 2013   (RSS)

By MercerDesign - January 25, 2013

I have got a search function on a website and it does work but on the results page the links to each search result are not correct, the structure of the site has got lots of folders for SEO purposes and the results are not finding those folders. The URL is www.ardingly.com, if you do a search for gcse you will see what I mean.

By gregThomas - January 25, 2013

Hi,

Would it be possible to post or attach your search pages code to a post? Are these results all coming from the same section, or are you searching multiple sections? I think you might have to create custom links for each search result, I can guide you through this process if you need.

Thanks!

Greg

Greg Thomas







PHP Programmer - interactivetools.com

By MercerDesign - January 28, 2013

Hi Greg, I'm attaching the code, all the results are coming from multiple sections/tables.

Thanks, Larraine

Attachments:

multisearch.rtf 41K

By gregThomas - January 28, 2013

Hi Larraine,

Thanks for posting your code. 

You can use the full directory path to the php page in each viewerUrl field for each section. For example, I think the news_list section needs changing to look like this:

$searchTables['news_list'] = array(
  'viewerUrl' => 'Ardingly_College_Sussex/News_Independent_Schools_Sussex/news_listPage.php',
  'titleField' => 'title',
  'summaryField' => 'summary',
  'searchFields' => array('title','summary'),
);

I also noticed that for this section you're linking to the list page as opposed to the detail page. I guess this is because not all news articles have a detail page?

Thanks!

Greg

Greg Thomas







PHP Programmer - interactivetools.com

By gregThomas - January 30, 2013

Hi Larraine,

This is correct.

Let me know if you have any questions. 

Thanks!

Greg

Greg Thomas







PHP Programmer - interactivetools.com