Problem Description
So, I have the next problem:
I try to create the new div `@type@` in
> /message/templates/message_area_contact.mustache
So the code looks like this:
... <div class="name">
{{fullname}}
<div style="font-style: italic; font-weight: 100;">{{type}}</div>
{{#showonlinestatus}}
<span {{^isonline}}class="hidden"{{/isonline}} data-region="contact-icon-online">
{{#pix}} t/go, core, {{#str}} online, message {{/str}} {{/pix}}
</span>...
Then, in `\message\classes\helper.php` the code is this:
if (user_has_role_assignment ($userfields->id, 3))
{
$data->type = "teacher";
} else {
$data->type = "student";
}
Not enough, in `message\classes\output\messagearea\contact.php`
in `__construct add next`:
$this->type = $contact->type;
and in `export_for_template`
$contact->type = $this->type;
So, after all I have
> next -> http://skrinshoter.ru/s/020218/5uGffk1d
Looks perfect, but when I change the tab for "contacts" I have
> nothing -> http://skrinshoter.ru/s/020218/hNZE5HUO
Any idea what can help me to show the type in contacts?
AI-Generated Solution
Powered by LMSouq AI · GPT-4.1-mini
Analyzing problem and generating solution…
Was this solution helpful?