Answer the question
In order to leave comments, you need to log in
How to remake the code after moving from modx evo to modx revo?
Please help me find the error. After transferring and editing the code, I can’t get it to work in any way.
There is a snippet for displaying working doctors for today's date. However, the output is empty.
<dl class="doctor_list">
</dl>
<?php
$today = date('l');
$image = $modx->getObject('tv.image', $id_vra4);
if($image['tv.image'] =='') $image['tv.image'] = 'путь к картинке';
$need_id = $modx->getObject( $today, $id_vra4);
foreach($need_id as $day=>$val)
{ if ($val !=='')
print '<dt></dt>
<dd>
<span class="ico"><img width="50" align="left" style="margin-right:5px;" src="'.$image['tv.image'].'" alt="" title="" /></span>
<div class="name">
<table cellpadding="0" cellspacing="0">
<tr>
<td colspan="2">
<a href="" title=""></a>
</td>
</tr>
<tr><td>Сегодня</td><td class="time">'.$need_id[$today].'</td></tr>
</table>
</div>
</dd>';
}
$title = $modx->getObject($value, 1, 'pagetitle');
print $title['pagetitle'];
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question