Jump to content

Recommended Posts

Захотел сделать блок похожие статьи, с определенной выборкой статей, на форуме уже имеется решение проблемы но оно мне не помогает. 
 

Вот сам код:


<table class="all-post-table">  
<tbody>
<tr>

{foreach $posts as $post}
{if $post->id == 5} | вывод новости с id номер 5
<td style="width: 50%;">
   <div class="div-left">
     <a href="blog/{$post->url}" class="img-caption">
     <div><img src="{$post->images|escape}"  alt="{$post->name|escape}"></div>
     <div class="title-text">{$post->name|escape}</div>
     </a>
   </div>
</td>
{/if}
{/foreach}

</tr>
</tbody>
</table>

 В результате статья не выводится и пропадают значения просмотров.

Помогите пожалуйста новичку  :rolleyes: 
Заранее спасибо!

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...