Tuesday, May 10, 2011

com-property customization

ok I'm back with a little information on how to customize / add new fields in the property description / features:

1. go to your_joomla_root_directory>language>en-gb(or what ever language you are using on your website)>en-GB.com_properties.ini and find the first line where it says HIDDE.
2. Note the "Extra" code number ... for example where it says EXTRA40=HIDDE, you would note the EXTRA40 part of it.
3. Then change the word HIDDE that is after that EXTRA40 to what ever you want the field name to be.
4. Save the file.
5. go to your_joomla_root_directory>administrator>language>en-gb(or what ever language you are using on your website)>en-GB.com_properties.ini and find the first line where it says HIDDE.
6. Follow steps 2-4 above.
7. If you are editing these files on your local machine & have to upload them to see the changes, do so now. If you are editing them directly on the server / webhost, skip this step and move on to step 8.
8. If after saving and uploading these files, check your website, both in the front and in the backend. Try adding a new property & look for the new changes / fields. If you see them you are finished customizing, but if you do not see them, move on to step 9.
9. If you do not see the above changes in your form, go to your com-properties component in your joomla backend and note Layout Properties Detail and whether or not you use tabs. Then move on to step 10.
10. your Layout Template Properties Detail template is called by one of the following files:
a) locate in your_joomla_root_directory>components>com_properties>views>templates:
i) for details templates using tabs:
- Default Template = details_tab.php
- Default 1 Template = details_tab1.php
- Default 2 Template = details_tab2.php
- Default 3 Template = details_tab3.php
ii) for details templates not using tabs:
- Default Template = details.php
- Default 1 Template = details1.php
- Default 2 Template = details2.php
- Default 3 Template = details3.php
11. After locating and opening (for editing purposes) the relevant file, locate, in the file, the code that calls the fields that you just added. For example, in the language files above you would have noted the "EXTRA" code ... so in the above details file, find where it says "EXTRA" and the number(s) that goes with that piece of code.
12. If, lets say, you entered your fields at EXTRA40 but in the code in the details file, you can only find EXTRA39, below that piece of code for EXTRA39, make a space (press your enter button on your keyboard) and then copy & paste the code from EXTRA39 into that space. Then change in that copied code, where it says EXTRA39 to EXTRA40.