Author Topic: Search Results embedded in current page  (Read 2135 times)

Offline Steve

  • Posts: 2
Search Results embedded in current page
« on: January 19, 2018, 11:25:54 AM »
I have upgraded a wsb2.8.3 site to wsb2.10 and added in a search box (which was not previously there). All my search pages are being displayed in the wysiwyg content part of the referring page and not on a separate page (which is what I would expect). I cannot find where to change or control this behaviour after looking through the forum and help sections. Can anyone offer any ideas please? Thanks in advance.

Offline Ruud

  • Posts: 3659
  • Gender: Male
  • Do not use PM for help! Please use the forum!
    • Dev4Me - Professional WebsiteBaker Development
Re: Search Results embedded in current page
« Reply #1 on: January 19, 2018, 11:34:35 AM »
I am not sure why this (refering page) "feature" was added.

You can disable it by modifying the file /{website_root}/search/index.php (using ftp)

Remove (or comment out) line 28 that says:
Code: [Select]
$page_id = @$_SESSION['PAGE_ID'] ?: 0;

Offline Steve

  • Posts: 2
Re: Search Results embedded in current page
« Reply #2 on: January 19, 2018, 11:39:11 AM »
Wonderful - such a quick and accurate response.
To further enhance this I have changed the value of $page_id in a previous line to match that of a new page I have configured for the search results.

This works perfectly now.

Many thanks, much appreciated.

Steve