S
S
Sergey Valitov2015-05-13 12:05:56
CMS
Sergey Valitov, 2015-05-13 12:05:56

How to display the latest news and the latest article in Simpla CMS?

Hello! This is the question - there is Simpla CMS (most likely it), tpl templates, Smarty are used everywhere. Is there a News/Articles module for it? It is necessary to display the latest news and article on the main page, at the bottom.. I looked at the $sections array - menus are stored there, $news is empty..

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
mcar, 2015-11-15
@mcar

Simpla is a very bad, unfriendly system, I really hope that you choose another one, but if not, then here is the answer to your question:

{* Выбор последней не новости, а записи в блоге, потому что раздела Новости не существует *}
{get_posts var=last_posts limit=1}
{if $last_posts}
  <div id="blog_menu">
    <h2><a href="blog">Новости</a></h2>
    <ul>
      {foreach $last_posts as $post}
        <li class="pro" data-post="{$post->id}">{$post->date|date} <a href="blog/{$post->url}">{$post->name|escape}</a></li>
      {/foreach}
    </ul>
  </div>
{/if}

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question