Phone and Email
Phone & Email
Displaying your phone number and e-mail address, allowing people to easily reach you.
Industries
- Bicycles
- Auto Parts
- Computers & Electronics
- Music & Instruments
Wireframe
Coding Instructions
Step 1: Connect to the website via FTP
Step 2: Open up the footer template
We will be editing footer.template.html
. This can be found in /httpdocs/assets/themes/skeletal/templates/footers/template.html . If using a different template, go into that template instead of the 'skeletal' template.
Step 3: Add code into the template
Add the following code and save the template. Replace the div with the class of col-sm-3
at line 164 with our own div to accommodate the phone and email address:
<div class="col-sm-3">
<address>
<strong>Copyright © [%format type:'date' format:'#Y'%]today[%/format%][@config:company_name@]</strong><br>
[%if [@config:company_abn@]%]<strong>ABN:</strong> [@config:company_abn@]<br>[%/ if%]
[%if [@config:company_poaddr@]%]<strong>Address:</strong> [@config:company_poaddr@][%/ if%]
<ul class="list-inline list-social">
[%if [@CONFIG:COMPANY_PHONE@]%]
<li><a href="tel:[@CONFIG:COMPANY_PHONE@]" target="_blank"><i class="fa fa-phone-square"></i> [@CONFIG:COMPANY_PHONE@]</a></li>
[%/if%]
[%if [@CONFIG:COMPANY_EMAIL@]%]
<li><a href="[%url type:'page' id:'contact_us'/%]" target="_blank"><i class="fa fa-envelope-square"></i> [@CONFIG:COMPANY_EMAIL@]</a></li>
[%/if%]
</ul>
<p class="small"><a href="https://www.neto.com.au" title="E-commerce Shopping Cart" rel="nofollow" target="_blank">E-commerce Software</a> By Neto</p>
</address>
</div>
The phone number and email address are both wrapped in a Neto B@se if statement. Similar to Javascript, an if statement needs a closing tag. This is done the same way a [%param%]
in a thumb_list
or content_menu
is closed. Unlike Javascript, however, you put your [%else if%]
and [%else%]
before the closing [%if%]
bracket:
Open the if state, if this is true it will run its code -
[%if [@CONFIG:COMPANY_EMAIL@]%]
- Run this code
If you have an else if statement, you can place it here -
[%elseif [@CONFIG:COMPANY_PHONE@]%]
- Run this code
And the backup else statement -
[%else%]
- No Email or Phone number for site
Finally close the if statement -
[%/if%]
In the code we are running above, we are checking if the site has a company phone number and a company email, their B@se tags are:
[@CONFIG:COMPANY_PHONE@]
[@CONFIG:COMPANY_EMAIL@]
These are set in the cPanel of the Business Details section:
Now the footer should show an email and phone number, which will display on every page: