Details
Description
Hi team,
Go to "Events" -> "Manage Events" -> (Select any event) -> Under "Configure" select "Location".
Add any mobile number and select type as "Mobile".
Now on "Event Info" page, it is showing "Phone" instead of "Mobile".
I am new to CiviCRM and Smarty. I am sending a patch here. Here I am using 'if' statement. Below code is working fine for me.
In civicrm/templates/CRM/Event/Page/EventInfo.tpl
{if $location.phone.1.phone || $location.email.1.email} <div class="crm-section event_contact-section">
<div class="label"><label>
<div class="content">
{* loop on any phones and emails for this event *}
{foreach from=$location.phone item=phone}
{if $phone.phone}
{if $phone.phone_type_id EQ 1}
<span class="tel">{ts}
Phone
{/ts} {$phone.phone} {if $phone.phone_ext} {ts}ext.{/ts}{$phone.phone_ext}
{/if} </span> <br />{/if} {if $phone.phone_type_id EQ 2}
<span class="tel">
{ts}Mobile{/ts} {$phone.phone} {if $phone.phone_ext} {ts}ext.
{/ts} {$phone.phone_ext}{/if} </span> <br />{/if}
{if $phone.phone_type_id EQ 3}
<span class="tel">{ts}Fax{/ts}
{$phone.phone}
{if $phone.phone_ext} {ts}ext.{/ts} {$phone.phone_ext}{/if} </span> <br />{/if}
{if $phone.phone_type_id EQ 4}
<span class="tel">{ts}Pager{/ts} {$phone.phone} {if $phone.phone_ext}
{ts}ext.{/ts} {$phone.phone_ext}{/if} </span> <br />
{/if}
{if $phone.phone_type_id EQ 5}
<span class="tel">{ts}
Voicemail
{/ts} {$phone.phone} {if $phone.phone_ext} {ts}ext.{/ts}{$phone.phone_ext}
{/if} </span> <br />{/if} {/if}
{/foreach}
{foreach from=$location.email item=email}
{if $email.email}
{ts}Email:{/ts} <span class="email"><a href="mailto:{$email.email}">{$email.email}</a></span>
{/if} {/foreach}
</div>
<div class="clear"></div>
</div>