152
rated 0 times
[
153]
[
1]
/ answers: 1 / hits: 58448
/ 7 Years ago, mon, july 10, 2017, 12:00:00
I have the text on my website appear from a .json file, and I want to have the line appear as:
Phone: 123-456-7890
Local: 012-35-6789
Instead I am getting:
Phone: 123-456-7890
Local: 012-35-6789
My code:
footer{
call_us: Phone: {phone_number} n Local: 012-345-6789
}
Is there something besides n I should be using?
Edit:
I am calling the JSON text to be displayed using the following code. I believe this is using Handlebars
{{#if settings.phone_number}}
<strong>{{lang 'footer.call_us' phone_number=settings.phone_number}}</strong>
{{/if}}
Full Code:
<article class=footer-info-col footer-info-col--small data-section-type=storeInfo>
<h5 class=footer-info-heading>{{lang 'footer.info'}}</h5>
<address>{{nl2br settings.address}}</address>
<script> var footer={
call_us: Phone: {phone_number} n Local: 012-345-6789
}
for (var key in footer) {
if (footer.hasOwnProperty(key)) {
console.log(footer[key]);
}
}</script>
<!--{{#if settings.phone_number}}
<strong>{{lang 'footer.call_us' phone_number=settings.phone_number}}</strong>-->
{{/if}}
</article>
More From » html