Answer the question
In order to leave comments, you need to log in
Did I correctly output html at a certain time, and hide it at a certain time from the point of view of Bitrix?
at the moment I am doing this:
<? if(date(H) > 9 && date(H) < 19): ?>
<div class="main-phone-block">
<a href="tel:84952128506" class="phone">8 (495) 212-85-06</a>
<div class="shedule">время работы с 9-00 до 18-00</div>
</div>
<? else: ?>
<div class="main-phone-block">
<a href="mailto:[email protected]" class="phone">[email protected]</a>
<div class="shedule">время работы с 9-00 до 18-00</div>
</div>
<? endif; ?>
Answer the question
In order to leave comments, you need to log in
If it works, then it's correct. But it can be improved.
Make a component, in the settings of which mail, phone, working time and interval will be transmitted.
(And if they are not set, then try to take from the default settings of Bitrix\Main\Config\Option )
Still in pursuit: it is better to store the values ( mail, phone, working hours and interval ) in the database (IB or HL, choose for yourself what you like best)
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question