![]() |
|
|||||||
![]() |
Realty Manager Tutorial: Adding a Rental Section to your Website
Note: although this example is used for creating links that point directly to the search results of all rentals and non-rentals, it can be applied to almost any scenario. For example, you could use it for any of the following: 1. Create a new listing field called Rental (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: Rental (Yes,No) - select drop down as the field type - make sure to click the "Active Field" check box.2. Now, whenever you create or modify a listing, you'll see a new dropdown field for rentals. Input some listings into your "Listing Editor" with some marked as "Yes" for rentals and some as as "No". 3. Download and open up your _search_query.html template page (/templates/_realty/_search_query.html) and add the following. (Make sure to add this somewhere between the open <form> and closing </form> tags. <input type="hidden" name="lfield25_keyword" value="no"> This hidden field tells the search engine to only return those listings which are NOT rentals. 4. Now go to your search query page in your browser. (search.cgi) <a href="the_url_you_copied_and_pasted">Click here to view all non-rentals</a> After uploading the newly modified templates, make sure to republish all of your files by going to the "Setup Options" and clicking each of the four publish buttons. This actually recreates your site's web pages based on your new template designs. 5. Finally, you'll want to add some sort of link to all your rental listings. To do this, just go back and repeat the above from step 3, only making "yes" the value in the hidden field. You can then get the search results for all of your "rental" listings and create your link based on the search results of this URL as well! Did this "How to" make sense? Send us your feedback, or let us know if you're using something like this on your installation of Realty Manager and we'll link to it as an example. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||