One of the most powerful features of Listings 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!
Creating a listing field, regardless of field type, you want to follow these steps:
- Login to the administration script as a superuser. (only superusers have access to Setup Options)
- Click on Setup Options.
- Look for the Setup Listings Fields button.
- Click on the button labelled "Setup" besides "Setup Listing Fields".
- You should see the Listing Database Fields window.
- Find an empty row and type in the field name.
- Select a field type from the dropdown menu.
- Type in a number representing the field order you want in Listings Editor.
- Check the Enabled checkbox.
- You can repeat step 6-9 for as many fields as you want up to 75 fields.
- Click on the "Save" button to commit the new fields.
Field Types
One of the most powerful features of Listings Manager is the flexibility of its database. You can request and store information using the following field types:
- text field
- text box
- wysiwyg
- dropdown
- checkboxes
- display only
Text Field, Text Box, and WYSIWYG Fields
The first three field types, text field, text box, and wysiwyg, are very similar. Each allows the user to store any information the user wants to provide. The only difference is the size of the field. Text field allows for a single line only. So information such as dates, prices, or ZIP codes are best served by a text field. A text box allows for paragraphs and multi-line text. The wysiwyg works exactly the same way as a text box, except you have the power of a Microsoft Word like toolbar at your disposal to make editing text easier.
Dropdown and Checkboxes Fields
If you don't know what dropdown boxes are, it's likely you've seen them before. Remember the field type mentioned in Step 7? That's a dropdown box. And if you don't know what a checkbox is, the enabled box in Step 9 is a checkbox.
Now that you know what dropdowns and checkboxes are, you can create your own as database fields. Let's say you want a dropdown field called Availability and you want the following dropdown options:
- In Stock
- Backorder
- Discontinued
To set this up, you first follow all the steps for creating a new field. If you just typed "Availability" as the field name and tried to select the dropdown in Listings Editor, you'd notice that although you see the dropdown, it doesn't have any selections. How do you add selections to the dropdown list? You add them to the field name, like this: (,In Stock, Backorder, Discontinued).
So if you go back to the Database field setup and change the field name to this:
Availability(,In Stock,Backorder,Discontinued)
* Notice the comma just after the opening ( symbol. That's required to indicate that the initial or default selection is blank.
Then the dropdown selections would appear. You do exactly the same thing with a checkbox field to add checkbox items.
IMPORTANT!!!
You don't leave a space between each selection. You don't want to do this:
Availability (, In Stock, Backorder, Discontinued)
This forces all your data to be stored with a space in front of it, which will adversely affect the search engine when, for instance, it tries to look for "Backorder" items when all your data's stored as " Backorder".
Display Only Field
So this leaves us to the last field type - display only. Adding a Display Only field doesn't add a new field at all. A "display only" field allows you to add comments to the Listings Order. Try it out and see for yourself! :) Remember that you can type in HTML code as well so you can customize the Listings Editor to add instructions and notes if needed.
Question: I made changes to the listing fields, so why am I not seeing the changes in the published content?
Listings Manager allows you to display exactly what fields you want in the exact formatting and style you want. Provide such a functionality involves indicating Listings Manager which fields to display and how. This is why when you make listing field changes, you'd want to edit the template files as well.
For more information on templates, check out this tutorial.
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".