![]() |
|
|||||||
![]() |
Realty Manager Tutorial: Creating New Listing Fields
One of the most powerful features of Realty Manager is the flexibility of its database. It comes with 75 fields for storing listing data and 50 fields for storing homepage data. Each and every one of these fields can be modified to store whatever information you want. So, if you have something specific in mind which you'd like to appear on your site, no problem! Step 1: Creating the New Fields Let's start with double glazing. Open up your favourite web browser and go to your Realty Manager. Here, click on Setup Options. This section contains the administrative section of your Realty Manager installation. Scroll down the page and click on "Setup Listings Fields". This page shows all the fields in your database; by default there are 24, but you can use all 75 if you desire. In a free field number (let's choose #30) enter in the following information: Field Name: Double Glazing(,Yes,No) And make sure you check "active field". Now when you click save, whenever you or one of your agents logs in and inputs a new listing, they'll see this new Double Glazing dropdown with three options: blank, Yes and No. (To remove the blank option, just remove the first comma before 'Yes'). Now let's add the other two fields. At field number #31, enter in: Field Name: Additional (Pond, Sandpit, Flower Garden) And at field number #32: Field Name: Private Comments Again, make sure they're both activated (place a check in the corresponding checkbox). Now - just to make sure - click save and go to the Listing Editor. Try adding a test listing; here you should see your newly added fields. The last field "Private Comments" was included for illustrative purposes. At this junction, you've provided a means for you and your agents to enter and save this new data, but it doesn't yet appear online. This is important. In order to make it appear online you need to do one more thing: update your templates. So, the "Private Comments" field allows you and your agents to enter in private information about a property without having it appear on your website. It's entirely secure, and is only visible to people who log in through Realty Manager. So now let's add those other two fields to your website pages. Step 2: Updating your Published Pages /templates/_realty/_publish_listing.html This file is used to create each and every detailed listing page. We're now going to edit this template to include your new data. (Also, if you wish to edit your listing index page - you'll need to make these changes to your publish_listing_index.html page, too). Open up the file in a text / HTML editor, and, at an appropriate spot in the code (depending on where you want the data to appear), enter in the following HTML: Double Glazing: $lfield30$<br> What this does is put two placeholders in the page. These placeholders are used by the Realty Manager program to plant the actual data into the page. Specifically, here's how it works: when you enter a new listing, the program looks at the _publish_listing.html template and creates a new HTML file from it. In doing so, it sifts through the template and replaces all the placeholders with the actual data. So, every page that is created is uniquely determined by the contents of the listing itself. $lfield30$ is the placeholder for listing field number 30; $lfield1$ is the placeholder for listing field number 1; $lfield75$ is the placeholder for listing field number 75. It's as simple as that! Now, re-upload the file to your server, and make sure it's put back in the /templates/_realty/ directory. (Note: it never hurts to make backups! :) Finally, go into Setup Options and click "Re-publish all listings". This recreates all your HTML files based on your new template. Now go and view one of your listings - if it contains information for those fields, you'll see it appear in your page! One final remark: This tutorial focused on adding a listing database field, not a homepage field; but the principle is exactly the same. The only difference is regarding the templates. You'll be concerned with these two templates: _publish_homepage_index.html and _publish_homepage.html, which are used to create your homepage index and individual homepages respectively. Follow the above instructions, only replace the $lfield#$ with $hfield#$. The "hfield" stands for "homepage field", whereas the "lfield" stands for "listings field". 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. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||