multiSearch.php results page

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

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 MercerDesign - January 30, 2013

Hi Greg

Thanks for this, I changed it to this:

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

news_listPage.php did not work so I have just changed it to the page that actually exists. Is that correct?

Regards, Larraine

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