
ChetW
Staff

Sep 24, 2006, 2:48 PM
Post #2 of 6
(5197 views)
Shortcut
|
|
Re: [CarlitosWay] Add search options
[In reply to]
|
Can't Post
|
|
Hi, Thanks for the post! You could use 2 of Listings Manager's spare fields to create a State and City search, this would involve making use of two new fields and then editing your advanced search template file. Does this sound like an option that may work for you? If so follow the steps below: Use a spare lfield to create a "State" select option: 1. Login to your Listings Manager admin section and select 'Setup Options' from the far right hand side of the screen. 2. You will notice a section called "Database Options" in this section select the 'Setup' button beside the "Setup Listings Fields" title. 3. You will now be on the "Listing Database Fields" page, there will be a series of unused lfields on this page we are going to use two of these spare fields. 4. First we will create a "State" field, select a spare lfield for example purposes I am going to choose "lfield10". Make note of this lfield number because we will need to use it a little later. 5. For lfield10 there is a text area secion called "Field Name" in this section type the following: State Selection (,state1,state2,state3,state4,state5) Replace the "state" text with the actual state names you would like to use. Next you will notice a "Field Type" option from this selection choose 'dropdown' also be sure that the "Enabled" check box is turned on. At this point we have created a "State" select option that will be used when entering a listing, next we will create the "City" select that will be used when adding a new listing. Use a spare lfield to create a "City" select option: 1. While remaining on the "Listings Database Fields" page you will want to select a new spare lfield, for example purposes I am going to use lfield11, like before make not of this lfield number because we will need to use it later. 2. In the "Field Name" text area type the following: City Selection Next for the "Field Type" option select 'textarea' also be sure that the "Enabled" check box is turned on. You will now have created the second "City" select field that will be used when creating a new listings. In total there is two fields that you have created, the first (lfield10) is a dropdown select for the state that the property is located in and the second (lfield11) is a textarea for typing in which city the listing being added is in. Now we will edit your advanced search page so that it has both the "State" and "City" search options available for searching. Editing your advanced search template file: 1. Login to your webserver and locate the "_search_query.html" template file, this file can be found inside the /templates/ directory on your webserver download this file to yor local computer. 2. Open the "_search_query.html template file and inside the <form> tags place the following code:
State Selection<br/> <select name="lfield10_keyword"> <option value="">state1 <option value="">state1 <option value="">state1 <option value="">state1 </select> The above code will add the "State Selection" dropdown to your advanced search page, remember to change the "state" text to the actual state names. Also you will want to change "lfield10" so that it is the actual lfield you are using for the state select option. Next take this bit of code:
City Selection<br/> <input type="text" name="lfield11_keyword" value=""> And place it where you would like the "City Selection" to appear on the advanced search page. This will give users a text area to type the city in when they are doing a search. Remember to replace "lfield11" with the actual field that you are using for the city selection option. :) When you are done editing the "_search_query.html" template file re-upload it to its proper spot in the /templates/ directory and then re-publish your Listings Manager pages from inside the Listings Manager admin section. :) Give this a try and if you have any further questions please don't hesitate to ask! Cheers, Chet Woodside - Product Specialist support@interactivetools.com [hr][i][url "http://www.interactivetools.com/consulting/"][b]Hire me![/b][/url] 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 [url "http://www.interactivetools.com/consulting/"][b]Priority Consulting[/b][/url].[/i]
|