Home | Products | Consulting | Forums | Support | Order | 1-800-752-0455
  Main
Index
Search
Posts
Who's
Online
Log
In

Home: Products: Listings Manager (Realty Manager & Auto Manager):
Search Result Templates calling listing templates

 

First page Previous page 1 2 Next page Last page  View All


hammo
Novice

Mar 26, 2004, 3:17 PM

Post #1 of 38 (12417 views)
Shortcut
Search Result Templates calling listing templates Can't Post

G'day,

I have a question relating to search templates.

Let's say, as your manual states, create custom search_results templates that will show different summary search results based on whether the search submitted was for a rental or sale property. That's no problem....

_search_results_rentals.html
_search_results_sales.html

...But how can the selected search_results template, then call the listing using only a rental or sale listing template ?

So _search_results_rentals would call the users selection and display the resulting listing using a rental listing template.

It seems pointless to be able to search and present specific information to a rental and then have to show it with heaps of blank spaces where the detailed sales information would be if it was a sale property.

I'm sure I'm not the first to ask this, but I can't find anything in the forum so far.

Cheers,

Craig.


hammo
Novice

Mar 26, 2004, 3:34 PM

Post #2 of 38 (12415 views)
Shortcut
Re: [hammo] Search Result Templates calling listing templates [In reply to] Can't Post

I think I've answered my own question.

It can't be done with Listings Manager. The reason is because the search_results page is generated dynamically on request from the user, but the listings are generated from a listing_template only when a new entry is saved or the entire set is re-published.

Quite a limitation really.

I think that's it in a nutshell.

Craig.


Eric
Product Specialist


Mar 27, 2004, 1:54 PM

Post #3 of 38 (12400 views)
Shortcut
Re: [hammo] Search Result Templates calling listing templates [In reply to] Can't Post

Hi hammo,

Thanks for the forum posts Smile.

To be honest, I've not sure what you mean by "It can't be done." You just either eluded the fact that you CAN have a rentals and sales section, so I've not sure I followed you there or understand what you mean by "limitation". If you can elaborate on these points I may be able to submit a feature request to the development team.

If you have other questions please let me know.
Cheers,
Eric Lau - Product Specialist
support@interactivetools.com


hammo
Novice

Mar 27, 2004, 4:20 PM

Post #4 of 38 (12398 views)
Shortcut
Re: [Eric] Search Result Templates calling listing templates [In reply to] Can't Post

G'day Eric,

Thanks for writing back. Maybe I'm not being clear enough, I'll have another go.

When the user clicks on a search result, how can you tell the search cgi to use a different template to produce the listing result, just for that particular search. For instance....

I can set up 2 (or as many as I want) different search_results templates as I want to. That's no problem. But because the actual listing template is set in the listings manager setup, there is no way to display the information relating to that listing in a different way depending on which search_result template they came from :)

That means that even if I display search results specific to a property for sale, when the user selects that property for sale then they will be displayed the listing in only the one configurable publish_listing template.

Wouldn't it be good, if I could direct the user to s search page for rentals and then display any selected listings from that page using a specific publish_listing_rentals template rather than a generic publish_listing as set in the LM setup.

As I said, I don't think LM can handle this because only one publish_listing template is definable. The pages are not built dynamically when the user selects the listing from the search result.

Cheers,

Craig.


Donna
Staff / Moderator


Mar 28, 2004, 1:12 PM

Post #5 of 38 (12383 views)
Shortcut
Re: [hammo] Search Result Templates calling listing templates [In reply to] Can't Post

Hi hammo!

Ah, I think I see what you're getting at. :)

You'll be happy to know that you certainly can use multiple publish listing pages! While Listings Manager will indeed only use one template for each static published page, you can use extra templates for dynamic published pages.

To do this, first create a template based on your _publish_listing.html template. For this example, we'll call it _publish_listing_rental.html

Then, modify the search_results_rental.html so that instead of linking to the static page placeholder, you're linking to this:


Code
<a href="/path/to/search.cgi?view=$listing_num$&template=_publish_listing_rental.html">


This will use the search engine to create a dynamic publish listing page, based on the template of your choice. :)

I hope this helps! Let me know if you'd like any more details. :)

Donna


Hire me!
Save time by getting our experts to help with your project. Template changes, advanced features, full integration, whatever you need. Whether you need one hour or fifty, get it done fast with Priority Consulting.


hammo
Novice

Mar 28, 2004, 4:19 PM

Post #6 of 38 (12382 views)
Shortcut
Re: [Donna] Search Result Templates calling listing templates [In reply to] Can't Post

Thanks Donna,

Just when I thought I knew what this gem software was capable of, it jumps up and suprises me again.

I'm in the middle of about 3 projects at the moment and I'll implement the search function as you described over the next couple of days.

Thanks again for the support, It's very good value (Free!).

Craig.


Sabo
User

Sep 13, 2004, 9:37 PM

Post #7 of 38 (11987 views)
Shortcut
Re: [hammo] Search Result Templates calling listing templates [In reply to] Can't Post

And we are all learning from your strange queries thank you Cool

My friend Jorge from Mexico that now is in Vancouver for the first time, he is developing this site:

http://www.nissanseminuevos.com/index.shtml

And he is trying to show along the results of a search the list of the last added cars.

In the column of the left the newest cars, and in the column of the right the search results.

I hope we are in the right thread.

Regards!
Sabo
----
www.malditoweekend.com

(This post was edited by Sabo on Sep 14, 2004, 8:42 AM)


Cliff
Staff


Sep 14, 2004, 1:25 PM

Post #8 of 38 (11969 views)
Shortcut
Re: [Sabo] Search Result Templates calling listing templates [In reply to] Can't Post

Hi Sabo,

The featured listings on the left of the site could be powered using Listings Manager. You could output by using a Server Side Include (SSI) that queries the search results of all of your featured listings.

I always recommend that people get the basics of their Listings Manager site set up before working with the more advanced pieces (such as creating a featured listings section on their front page). The reason for this is the featured listings section does require working with some of the more advanced features of Listings Manager, such as custom templates, listings fields, and also makes use of SSIs. So having a familiarity with the program first is very strongly recommended.

That said, when you're ready to begin working on this section I've included below a tutorial on how to include 4 featured listings on your page.

1. Create a new listing field called Featured (,Yes,No)

This can be done by going to the "Setup Options" --> "Setup Listing Fields"

Find a spare listing field where you can add this. In this example we'll use field #25. Enter in the following:

Featured(,Yes,No) - select drop down as the field type- make sure to click the "Active Field" check box.

2. Now create some test entries in your "Listing Editor", and create some listings as featured and some as not.

3. Make a copy of your current _search_results.html template. Rename it something relevant like:

_search_results_featured.html

There doesn't need to be any extra HTML in this temp-late, just the code in the templatecells that display the listings information.

4. Once that is done you just need to add your SSI to the homepage. The code for that will look something like this:

<!-- INCLUDE FEATURED PROPERTY-->
<!--#include virtual="/cgi-bin/exec/search.cgi?search=1&perpage=4&lfield25_keyword=Yes&template=_search_results_featured.html" -->

Note that the perpage value can be changed to reflect however many featured listings you plan to showcase on your front page.

That should give you the result that you are looking for, but if you need help getting that up and running just let me know. I'm here to help Smile

<---- Edit ---->
I've uploaded an example template that you can download and use as a reference
<---- Edit ---->
Regards,
Cliff Stefanuk - Customer Service Manager
support@interactivetools.com


(This post was edited by Cliff on Jul 13, 2005, 2:49 PM)
Attachments: _search_results_featured.html (6.37 KB)


Sabo
User

Sep 15, 2004, 10:03 AM

Post #9 of 38 (11948 views)
Shortcut
Re: [Cliff] Search Result Templates calling listing templates [In reply to] Can't Post

Thank you Cliff, the featured listing worked! Smile But the problem that I have is that I want to do this in the result of my search, for example, when I go to this section:

http://www.nissanseminuevos.com/cgi-bin/exec/search.cgi

I do a search, the result of my search is displaying using the _search_results.html template, it is possible to insert a _search_results_featured.htm inside of _search_results.htm?

or the result of my:
/cgi-bin/exec/search.cgi
can be addressed to another archive that have the _search_results_featured.htm?

two diferents results in the same template.

Thanks again I appreciate your help.
Sabo
----
www.malditoweekend.com

(This post was edited by Sabo on Sep 15, 2004, 10:05 AM)


Cliff
Staff


Sep 15, 2004, 11:09 AM

Post #10 of 38 (11943 views)
Shortcut
Re: [Sabo] Search Result Templates calling listing templates [In reply to] Can't Post

Hi Sabo,

Glad to hear that worked!

Since these the page that this template is dynamically generated, meaning that it doesn't actually have a static page that you refer to, it's not possible to use include files such as SSI or other server side scripting functions. Unfortunately, it's the nature of CGI that doesn't allow for this. Including something through an <iframe> may work, but you may need to consider not using this function on the search results pages.

I hope that helps explain, but if you have any further questions, please don't hesitate to ask Smile
Regards,
Cliff Stefanuk - Customer Service Manager
support@interactivetools.com


Sabo
User

Sep 16, 2004, 10:14 AM

Post #11 of 38 (11925 views)
Shortcut
Re: [Cliff] Search Result Templates calling listing templates [In reply to] Can't Post

No more questions sir, everything is clear now, I think the iframe isn't a good solution, I will get arround with something different.

Thanks for your time and help Cliff.

Regards,
Sabo
----
www.malditoweekend.com


TheFrameGuy
Novice

Nov 26, 2004, 10:53 AM

Post #12 of 38 (11640 views)
Shortcut
Re: [Cliff] Search Result Templates calling listing templates [In reply to] Can't Post

1) Using Realty Manager Version 2.30
2) Created a new search results template named _search_results_demo.html.
3) Included the SSI tag <!--#include virtual="/cgi-bin/realtymanager/exec/search.cgi?search=1&perpage=25&lfield2_Westgate=Yes&_search_results_demo.html" -->
4) Rather than using the alternate search results template, the system uses the _search_results.html template. Also, the results do not show just the Field 2 keyword Westgate.


Is this feature not supported in Realty Manager 2.30? http://www.willowbend.us/html/realestate/re_westgate_demo.shtml


Cliff
Staff


Nov 26, 2004, 2:50 PM

Post #13 of 38 (11630 views)
Shortcut
Re: [TheFrameGuy] Search Result Templates calling listing templates [In reply to] Can't Post

Hi TheFrameGuy,

Thanks for posting and welcome to the forum!

I think that you are just a couple steps off track here. From what I can see on your example page, it's actually using both templates. If you go to this URL you can see how the search results are being returned:

http://www.willowbend.us/cgi-bin/realtymanager/exec/search.cgi?search=1&perpage=25&lfield2_Westgate=Yes&_search_results_demo.html

So you can see these results there have a fully constructed template, with the HTML to show the top and side navigation elements. You don't need to have that extra HTML in this template, just the code in the templatecells that display the listings information. That way when you use the SSI you just pull in the lisitings, not the additional formatting. Just remove that additional formating and you should be ok.

Now to get only the Westgate listings, all you need to do is make a minor adjustment to the search query string.

Just change this:


Code
 lfield2_Westgate=Yes


To this:


Code
 lfield2_keyword=Westgate



So that means that your new SSI will then look like this:

<!--#include virtual="/cgi-bin/realtymanager/exec/search.cgi?search=1&perpage=25&lfield2_keyword=Westgate&_search_results_demo.html" -->

I hope that helps to clarify, but if you need any more details just let me know and I'll do my best to help!
Regards,
Cliff Stefanuk - Customer Service Manager
support@interactivetools.com


TheFrameGuy
Novice

Nov 30, 2004, 3:52 PM

Post #14 of 38 (11591 views)
Shortcut
Re: [Cliff] Search Result Templates calling listing templates [In reply to] Can't Post

Cliff, thanks for responding. Both my issues still don't seem to work. By clicking http://www.willowbend.us/cgi-bin/realtymanager/exec/search.cgi?search=1&perpage=25&lfield2_Westgate=Yes, the results should only show the the "Westgate" results and it is showing ALL the results. The lfield2 field is the "Village" field.

On the other issue, the _search_results_demo.html template in this link http://www.willowbend.us/cgi-bin/realtymanager/exec/search.cgi?search=1&perpage=25&lfield2_keyword=Westgate&_search_results_demo.html is not showing. That template should ONLY show the lfield2 field.


ross
Staff / Moderator


Dec 1, 2004, 3:36 PM

Post #15 of 38 (11575 views)
Shortcut
Re: [TheFrameGuy] Search Result Templates calling listing templates [In reply to] Can't Post

Hi theFramGuy.

Thanks for the update!

You are almost there with the link; just one last thing and it should be good to go.

I think if you use this:

http://www.willowbend.us/cgi-bin/realtymanager/exec/search.cgi?search=1&perpage=25&lfield2_keyword=Westgate&template=_search_results_demo.html

you should be fine. The only difference is that in this one I added “template=” before the name of your custom template.

Now that the link is working fine, it looks as though you may have accidentally removed one of the template cells on your custom template. On a search results template there needs to be 4 template cells defined:

row_image
row_image_new
row_noimage
row_noimage_new

The code to define them looks like this:

<!-- templatecell : row_image -->

content goes here

<!-- /templatecell : row_image -->

Keep in mind that the closing tag needs to be there too.

I think you’ll find that adding the above code to your custom template should fix the problem. While you are adding the code I recommend that you take a quick look through the template to make sure that all the template cells are properly defined.

I hope this helps. If this doesn’t get you on the right track again, or you have another question, don’t hesitate to let me know Smile.
-----------------------------------------------------------
Cheers,
Ross Fairbairn - Product Specialist
support@interactivetools.com


Hire me!
Save time by getting our experts to help with your project. Template changes, advanced features, full integration, whatever you need. Whether you need one hour or fifty, get it done fast with Priority Consulting.




mw5cents
User

Apr 8, 2005, 12:43 AM

Post #16 of 38 (11087 views)
Shortcut
Re: [Cliff] Search Result Templates calling listing templates [In reply to] Can't Post

Cliff or anyone!

I followed Cliff's instructions to a t. But I am still unable to get my new index to display the featured listings. I am hoping someone can guide me in the correct direction.

New Index
http://www.mywebaddress.com/index_v2.html

_search_results_featured.html
http://www.mywebaddress.com/templates/_realty/_search_results_featured.html

Direct link to Featured Listings Search Results:
http://www.mywebaddress.com/exec/search.cgi?search=1&perpage=5&lfield18_keyword=Yes&_search_results_featured.html
Strange thing with this, it looks nothing like my _search_results_featured.html file. The layout is totally different, along with the fields (don't match up).

So if someone could take a quick peek and tell me what I am missing I would greatly appreciate it!

Oh, 2 more things:
1) Sorry for bringing this thread back from the dead
2) I feel this thread should really be moved to the LM add-on forum
(Come on Cliff...get on the ball! Tongue)

Thank you in advance!

Matt


(This post was edited by mw5cents on Apr 11, 2005, 10:28 AM)


Cliff
Staff


Apr 8, 2005, 9:11 AM

Post #17 of 38 (11083 views)
Shortcut
Re: [mw5cents] Search Result Templates calling listing templates [In reply to] Can't Post

Hey Matt,

Thanks for posting.

It's ok to revive an old thread, in fact it's really helpful since it brings some good threads back to the top of the list that may have been previously missed by other users.

I think that the solution to this will be pretty easy Cool

What you’ll want to do is change index_v2.html to index_v2.shtml. The reason for this is because the listings are pulled onto the page using SSIs (Server Side Includes). And on most web servers, SSI’s need to be on an shtml page to work.

Try switching file extension over and let me know how that goes.
Regards,
Cliff Stefanuk - Customer Service Manager
support@interactivetools.com


mw5cents
User

Apr 8, 2005, 12:35 PM

Post #18 of 38 (11078 views)
Shortcut
Re: [Cliff] Search Result Templates calling listing templates [In reply to] Can't Post

Cliff,

Thank you for your promt reply. OK now I'm about half way there! Changing to .shtml did work, however it seems that it is using my _search_results.html instead of using my _search_results_featured.html template.

The reason I say this is, now my index_v2.shtml loads the design within the design. I shouldn't have to change the _search_results.html ... should I?? My _search_results.html has all design elements (header, navigation & footer) & my _search_results_featured.html is barebones.

If you are confused what I am saying, take a look:
http://www.mywebaddress.com/index_v2.shtml

Thank you in advance!!

Matt


(This post was edited by mw5cents on Apr 11, 2005, 10:29 AM)


MikeB
Staff / Moderator


Apr 9, 2005, 3:23 PM

Post #19 of 38 (11046 views)
Shortcut
Re: [mw5cents] Search Result Templates calling listing templates [In reply to] Can't Post

Hi Matt,

Thanks for the post! Smile

I took a look at your site and did see what you were saying. It looks like Listings Manager is using the same template for both pages so you're seeing the design twice.

I think to change this that you'll just want to make a quick change to the SSI you're using. I noticed in an earlier thread you mentioned that this is what the URL directly to your featured results looks like:

http://www.mywebaddress.com/exec/search.cgi?search=1&perpage=5&lfield18_keyword=Yes&_search_results_featured.html

I think that you'll want to just add in the "template" attribute so your headers and footers aren't repeated on your page. This means your URL would actually look like this:

http://www.mywebaddress.com/exec/search.cgi?search=1&perpage=5&lfield18_keyword=Yes&template=_search_results_featured.html

You'll notice I just added the word "template" as an attribute in the link. If you take a look you'll see that this actually has the layout you're looking for. You should be able to just change your SSI to add this "template" attribute to get this up and running.

If you have any other questions about setting this up feel free to let me know! Smile

Cheers,
Mike Briggs - Product Specialist
support@interactivetools.com


Hire me!
Save time by getting our experts to help with your project. Template changes, advanced features, full integration, whatever you need. Whether you need one hour or fifty, get it done fast with Priority Consulting.


(This post was edited by MikeB on Apr 21, 2005, 10:05 AM)


mw5cents
User

Apr 11, 2005, 10:27 AM

Post #20 of 38 (11024 views)
Shortcut
Re: [MikeB] Search Result Templates calling listing templates [In reply to] Can't Post

MikeB & Cliff,

Thank you for all your help! Works like a champ now!

Matt


copious
User

May 6, 2005, 1:41 PM

Post #21 of 38 (10721 views)
Shortcut
Re: [MikeB] Search Result Templates calling listing templates [In reply to] Can't Post

Hi Guys,

Just following the tutorial above and was having the same issue - after reading further it seems that the issue is not having the &template= before the "new" results page causes all the problems. may be worth editing the original outline to save people time (just a thought)

I am using this technique on a php homepage so am using a php include command with an absoulute URL - any php bods out there see an issue with this, please let me know as I am still a newbie when it comes to PHP.

I wanted to ask what would happen if I had &perpage1 but had 2 entries as featured Yes selected - would it display the newer entry or oldest? depending on which is it possible to make sure it will always be the newer - this is just incase a client decides that the latest property they add should be featured but don't deselect the current one (does that make sense)?

TIA


Cliff
Staff


May 7, 2005, 1:08 PM

Post #22 of 38 (10708 views)
Shortcut
Re: [copious] Search Result Templates calling listing templates [In reply to] Can't Post

Hi copious,

Thanks for posting.

If you have 2 entries, it's going to take the latest listing first. If you want to make sure that the first listing is always going to show up, you can add &sort_order=-11,123,reverse to your query string just to be safe.

If you need any more details just let me know Smile
Regards,
Cliff Stefanuk - Customer Service Manager
support@interactivetools.com


copious
User

May 7, 2005, 4:08 PM

Post #23 of 38 (10703 views)
Shortcut
Re: [Cliff] Search Result Templates calling listing templates [In reply to] Can't Post

I'm just starting to work with the actual search results and there criteria so am sure that I will have a few questions (probably redundant) about this. However, what is the significance of the -11,123 number - I understand the reverse in displaying the latest first but not the figure (sorry curious mind).

For clarification what you are saying is that if I have &perpage=1 it will always show that last/latest entry.

thanks for the response.


ross
Staff / Moderator


May 8, 2005, 9:15 AM

Post #24 of 38 (10691 views)
Shortcut
Re: [copious] Search Result Templates calling listing templates [In reply to] Can't Post

Hi Copious.

Thanks for the update!

Here’s a little breakdown on how the sort_order works. As you know there are 3 attributes to it: sort_order=-11,123,reverse

The -11 is which field in your database you want the sort to be done on. In most cases this would be a positive number based on the lfields you have set up. These values are all stored in your listing.dat.cgi file which, if you were to open, would look something like a CSV. If you were to look through this file, and consider the field where lfield1 is stored as “1”, you can count back through all the files until you get 11 values before lfield1. You can refer to this field as -11 because it’s 11 before lfield1. This is actually the date your listing was created on by the way, so doing a sort_order on -11 will sort by the date a listing was created. You can use this method to do sorts on any of the fields in your database; just count backwards from lfield1 and substitute that value for the -11.

The 123 is what kind of sort you want to do. There are two options for this one. 123 does a numerical sort. abc does a alphabetical sort. Depending on which field you want sorted you’ll want to pick an appropriate value for this attribute.

Finally, as you had already pointed out, the reverse is which direction to sort in. the alternative here would be forward. And maybe just to clarify a little more:

Forward: 1,2,3,4,5,6,7,8,9,10
Reverse: 10,9,8,7,6,5,4,3,2,1

Does this all make sense? Just let me know if there are anymore details I can go over again for you Smile.
-----------------------------------------------------------
Cheers,
Ross Fairbairn - Product Specialist
support@interactivetools.com


Hire me!
Save time by getting our experts to help with your project. Template changes, advanced features, full integration, whatever you need. Whether you need one hour or fifty, get it done fast with Priority Consulting.




copious
User

May 10, 2005, 1:11 AM

Post #25 of 38 (10658 views)
Shortcut
Re: [ross] Search Result Templates calling listing templates [In reply to] Can't Post

Hi Ross.

Thanks for the response - I see what you mean by looking at the listing.dat.cgi file where every thing sits. Can I ask what the 999, and the -9 and -8 numerical entries are (curious mind) I can see the thumbnail information and the obviously the listing fields.

I was going to put this up on the board but may as well ask here as I believe it is relevant. I want to do backup of data (for obvious reasons) I was going to ask what the best process would be. However, would backing up the listing.dat.cgi file be an option worth considering. Am I right in thinking that this data is used to create the lisitngs when the "publish" button is used in the administration setup area. Therefore if a clean install occured the listing.dat.cgi file could be copied over with the old backup and the republish the pages. I doubt it is that easy but worth a question.

Alternatively what is the best solution for a full backup?


TIA

First page Previous page 1 2 Next page Last page  View All
 
 


Search for (options)
Products
CMS Builder
Article Manager
Realty Manager
Listings Manager
Order Now
Services
Priority Consulting
Support
Online Documentation
Support Forums
Support Homepage
Company Info
12 reasons to choose us!
Meet the team
Monthly newsletter
Contact Us
Toll Free: 1-800-752-0455
Phone: (604) 689-3347
Sales | Support
Conditions of Use | Privacy Policy | Copyright © interactivetools.com 2008
#201 - 2730 Commercial Drive, Vancouver BC Canada V5N 5P4