
david259
New User
Feb 13, 2009, 11:10 PM
Post #1 of 3
(2700 views)
Shortcut
|
|
Invoking A Custom Template From A Search Form
|
Can't Post
|
|
Hello! My client (a large real estate agency) is an enthusiastic user of Realty Manager. They have hundreds of listings for Homes, Land, Farms, Acreage, Commercial and Auction properties - and while the basic templates suit them just fine for most of these categories, they want to implement a separate template for their Commercial listings. Following some instructions I found in another post on this board, I was able to create separate _search_results_comm.html and _publish_listing_comm.html templates and get them them to come up correctly on all the direct links in their site, so I have no problem with that (eg: <A HREF="..blahblah...">List All Commercial Properties</A> But my client *also* has a search box that allows visitors to query all the listings on the site. And I'm at a loss how to instruct search.cgi to use the normal templates for all categories except "Commercial" (ie if a client selects "Commercial" as a type in the search box, which is "lfield3_keyword" on his particular search box set-up) I keep thinking that I may need an IF...ELSE statement - perhaps in Javascript - to the effect that IF lfield3_keyword=Commercial (call the Commercial template) ELSE (call the normal templates) ENDIF when invoking search.cgi, But I have no idea how to do this, and I'm sure you probably know an easier way anyway. Can you offer any advice? Thanks in advance!
(This post was edited by david259 on Feb 14, 2009, 5:23 PM)
|