d. Database Field Types

Top  Previous  Next

Database Field Types represent the way data will be entered, stored and displayed to the users. There exists database field types for listings and for user profiles. There are 10 predefined database field types for listings: List, String, Text, Integer, Float, Boolean, Geographical, File, Video, Tree; and 5 predefined database field types for user profiles: String, Text, List, Boolean, Picture.

 

Exterior view of a listing field or a user profile field on the input, search and display forms is determined by templates of a corresponding database field type. Templates of Database Field Types are divided into three types: input, search and display templates. You can find these templates here: / templates / [Theme Name] / field_types . This folder consists of three folders: input, search and display. Each of these folders contains a set of templates for each database field type.

 

You may use the following syntax in templates to display any listing field or user profile field:

 

{input property = Price template = [Your Template Name]} (for input fields)

{search property = ZipCode template = [Your Template Name]} (for search fields)

{display property = Year template = [Your Template Name]} (for display fields)

 

If you do not specify the template (template = [Your Template Name]), the system will display the default template of a type. So, if the 'Price' field is the float type and you specify {input property = Price}, the 'Price' field will be displayed according to the template: / templates / [Theme Name] / field_types / input / float.tpl.

 

More information about templates of field types see in the section: 'Module Templates Reference - ORM'.                    

 

For more information about database field types see 'Database Field Types Reference' section.