View Full Version : "searchresults_main.html" not working
Sonia
03-22-2009, 09:56 AM
Hey there! I am trying to create a custom template for the search results page(s) (which I gather will also change the listings results page, as well). I did go to the template documentation, and under "Main Templates" it said:
6. searchresults_main.html - This is an optional main template that allows you to load a unique template for your search results page. This can be used to define custom metatags for your search result pages or to simply give your search results a different look from the main template.
However my listing page is still showing the main.html template. Now, I used the custom templates for the other pages using "page#_main.html" and that worked perfectly! Am I doing something wrong - is there another file name I should be using instead?
I should mention that I am using/editing the "or_crystalx" template. Here's the URL of the site I'm talking about: http://www.robwilkinson.ca/realty/ (currently not live). Click on "Listings" at the top to see that it's using the same template as the main one. Be aware this is very much a work in progress.
Sonia Wilkinson
pbflash
03-22-2009, 10:55 AM
What version of OR are you using? Are you saving the template filee to the correct template folder?
Sonia
03-23-2009, 12:55 PM
I'm using version 2.5.6. I saved the searchresults_main.html file in the template/or_crystalx/. The same location as the page#_main.html and main.html files.
pbflash
03-23-2009, 01:42 PM
Make sure the file was uploaded to the server. I just checked my 2.5.6 test site and it is working.
Check your index.php file and see if you see the code to load the searchresults_main.html template.
Sonia
03-23-2009, 02:37 PM
You rock!! It was the index.php thing. I just replaced that file with a new downloaded version of 2.5.6 and it worked! I had upgraded my 2.4.something version to 2.5.6, so maybe that file didn't get upgraded or I missed uploading it...who knows! Makes me wonder what else wasn't uploaded properly.
It's fixed, that's all I care about! Thanks so much!
Sonia
dafsport
04-18-2009, 09:38 PM
Any one else tried this and have it working? I download the latest version 2.5.6 and followed instructions to the 'T' and BAM - nothing. I like the idea of having a different look on some of the pages...etc.
1)...check index.php for correct code
2)...uploaded searchresults_main.html
3)...copied the html from search_result_default.html
4)...ran test
What could be the issue here?
dafsport
04-19-2009, 03:38 PM
Would love to get this working if possible - help!
dafsport
04-20-2009, 08:16 AM
I can't believe that there is no one else using this searchresults_main.html feature!
the_sandking
04-20-2009, 09:20 AM
I can't believe that there is no one else using this searchresults_main.html feature!
Lots of people use it, but simply aren't having problems.
"BAM nothing" doesn't describe a problem very well.
dafsport
04-20-2009, 01:01 PM
Well, could the issue be me? As I said from post #6, I downloaded the latest version 2.5.6 and setup shop on my Powerbook. No issues with the installation (I've done this numerous times with different version of OR).
Made sure the necessary snippet of code was in my index file and uploaded the searchresults_main.html to the correct template folder. I copied all the html info' from the search_result_default.html file and paste in new searchresults_main.html file.
Ran a simple search..... that brings up the search results page in my browser. However, no output is on the page from the template tags {listing_field_baths_value}...etc
Do I need to check anything else??
dafsport
04-20-2009, 01:50 PM
Ok. I got it.
I was copying the html data from search_result_default.html to searchresults_main.html template (wrong). search_results_default.html works in conjunction with searchresults_main.html (basically substituting the main.html). So the html from main.html should be copied to searchresults_main.html.
I can now work my magic with the coding....
pbflash
04-20-2009, 01:53 PM
The searchresults_main.html file is not for displaying the actual search results. It is to replace the main template (main.html) when viewing the search results page. The file should be similar to your main.html file, not your search results template file.
pbflash
04-20-2009, 01:54 PM
You posted while I was typing. Glad you figured it out.
dafsport
04-20-2009, 02:13 PM
Thanks. Thing with me...I'll just keep on trying...and trying...and trying....til BAM! Got it. Sometimes a little discussion stimulates the mind.
Again, thanks.
Powered by vBulletin® Version 4.1.5 Copyright © 2013 vBulletin Solutions, Inc. All rights reserved.