Add a standard field to CompanyDirectory
Posted: Thu Jan 24, 2008 9:38 am
Because custom fields are placed in a different table and can't be displayed in de companylist, I want to put a extra standard field ('city') to the module CompanyDirectory. I have put new lines under '#Display template' in the file action.addcompany.php :
And in the template 'editcompany.tpl', i have add:
After this action, the least i can espect is an extra field in the form 'add new company', but i get a extra field with the following label:
--Add Me - module:CompanyDirectory string:city--:
This should be ' city ' without the stuff before it
What is the reason for the extra code? Or better, how can i put a extra standaard field to Company Directory without using custom fields?
When i make a copy of the addressfield in the template, i will display double with the same and normal label. So, i don't see any problems in the way i use the template.
Code: Select all
$this->smarty->assign('citytext', $this->Lang('city'));
$this->smarty->assign('inputcity', $this->CreateInputText($id, 'city', $city, 30, 255));
Code: Select all
<div class="pageoverflow">
<p class="pagetext">{$citytext}:</p>
<p class="pageinput">{$inputcity}</p>
</div>
--Add Me - module:CompanyDirectory string:city--:
This should be ' city ' without the stuff before it

What is the reason for the extra code? Or better, how can i put a extra standaard field to Company Directory without using custom fields?
When i make a copy of the addressfield in the template, i will display double with the same and normal label. So, i don't see any problems in the way i use the template.