Hi, I have modified the template
/client/res/templates/fields/phone/detail.tpl
So that the WhatsApp icon and the phone appear for the user to choose the way to contact.
The icons are put in /client /img/
The code works correctly as we wanted.
My question is how would it be implemented correctly in the custom folders so as not to modify the original code in the event of possible updates?
/client/res/templates/fields/phone/detail.tpl
So that the WhatsApp icon and the phone appear for the user to choose the way to contact.
PHP Code:
{{#if phoneNumberData}}
{{#each phoneNumberData}}
<div>
{{#unless invalid}}
{{#unless erased}}
<a href="https://api.whatsapp.com/send?phone={{valueForLink}}" target="_blank" data-phone-number="{{valueForLink}}" data-action="dial">
{{/unless}}
{{/unless}}
<span {{#if lineThrough}}style="text-decoration: line-through"{{/if}}><img src="client/img/whatsapp.png" height="20" width="20"> </span>
{{#unless invalid}}
{{#unless erased}}
</a>
<a href="tel:{{valueForLink}}" data-phone-number="{{valueForLink}}" data-action="dial">
{{/unless}}
{{/unless}}
<span {{#if lineThrough}}style="text-decoration: line-through"{{/if}}><img src="client/img/telefono.png" height="20" width="20"> {{phoneNumber}}</span>
{{#unless invalid}}
{{#unless erased}}
</a>
{{/unless}}
{{/unless}}
{{#if type}}
<span class="text-muted small">({{translateOption type scope=../../scope field=../../name}})</span>
{{/if}}
</div>
{{/each}}
{{else}}
{{#if value}}
{{#if lineThrough}}<s>{{/if}}<a href="tel:{{valueForLink}}" data-phone-number="{{valueForLink}}" data-action="dial">{{value}}</a>{{#if ../lineThrough}}</s>{{/if}}
{{else}}
{{#if valueIsSet}}{{{translate 'None'}}}{{else}}...{{/if}}
{{/if}}
{{/if}}
The code works correctly as we wanted.
My question is how would it be implemented correctly in the custom folders so as not to modify the original code in the event of possible updates?
Comment