|
How to Add a New Value to a “List”-Type Field and Translate It?
For example, you want to add a new field called Floors.
| 1. | Add a new value to Admin panel ->Listing Management -> Listing Types -> edit Floors -> click the “Edit List Values” link -> add a new color to the “Add a New List Value” form, for example, “Two” |
| 2. | Move this value within the list on the appropriate position |
| 3. | Go to Language Management -> Manage Phrases -> click the “Add new” link -> fill in the form: |
| b. | Domain = Property_Floors |
| d. | YourSecondLanguage = The equivalent for the new language |
And click the “Save” button.
How to Add a Field to a Form?
For example, you want to add a keyword search to a Quick Search form.
| 1. | Go to Admin Panel -> Site Layout -> Module templates -> edit “Classifieds Engine” -> edit “quick_search.tpl” |
| 2. | Add the following lines to where you want to locate this field : |
<tr><td align="right">[[FormFieldCaptions!Keywords]]
</td>
<td>{search property=keywords}
</td>
</tr>
“FormFieldCaptions” is the domain (i.e. group of phrases) where “Keywords” belongs to. Square brackets ‘[[‘ and ‘]]’ are opening and closing tags for a phrase that will be translated.
How to Add a NEW Phrase?
For example, you want to have a new field “Floors”.
| 1. | Create a new list-type field in Admin panel ->Listing Management -> Listing Types -> edit “Car” -> click the “Add a New Listing Field” link -> fill in the “Add a New Listing Field” form: |
| d. | Required = “0” (unchecked) |
Click “Save”.
| 2. | Edit a newly created “Floors” field there and add values to a list: |
| 3. | Add the “Floors” field to the input_form_car.tpl form at Admin Panel -> Site Layout -> Module templates -> edit “Classifieds Engine” -> edit “input_form_forsale.tpl”: |
<tr>
<td>[[$form_fields.Floors.caption]] :</td>
<td>{input property=Floors}</td>
</tr>
| 4. | Add the “Floors” field to the listing_details.tpl form at Admin Panel -> Site Layout -> Module templates -> edit “Classifieds Engine” -> edit “listing_details.tpl”: |
<tr><td><b>[[FormFieldCaptions!Floors]]:</b> [[$listing.Floors]]</td></tr>
| 5. | Go to Admin Panel -> Language Management -> Manage Phrases -> find the “Floors” phrase: |
and click “Show”. Translate the phrase by clicking the “Edit” button and filling in the form.
| 6. | Open the /languages/en.xml file (the language file of the default language) and add the following line after the <pages> tag in order to create a new domain (group of phrases): |
<page key="Property_Floors"/>
Now you will be able to add the values to the “Floors” phrase (not field!) and translate them.
| 7. | To add and translate the values to the “Floors” phrase, go to Admin Panel -> Language Management -> Manage Phrases -> click the “Add New” link - > fill in the “Add a New Phrase” form: |
| b. | Domain = Property_Floors |
| d. | YourSecondLanguage = The translation for this language (e.g. in French = Deux) |
You need to add all values for the “Floors” phrase this way.
|