gino-news  2.1.0
Modulo News per gino CMS
last.php
Go to the documentation of this file.
1 <?php
17 ?>
18 <? namespace Gino\App\News; ?>
19 <? //@cond no-doxygen ?>
20 <section id="news-last-news-<?= $instance_name ?>">
21  <h1>Ultime news <a class="fa fa-rss" href="<?= $feed_url ?>"></a></h1>
22  <? if(count($news)): ?>
23  <? foreach($news as $n): ?>
24  <article>
25  <h1><a href="<?= $n->getUrl() ?>"><?= \Gino\htmlChars($n->ml('title')) ?></a></h1>
26  <time><?= \Gino\dbDateToDate($n->date) ?></time>
27  <? if($n->img): ?>
28  <? $image = new \Gino\GImage(\Gino\absolutePath($n->getImgPath())); $thumb = $image->thumb(100, 100); ?>
29  <img class="left" style="margin: 0 10px 10px 0" src="<?= $thumb->getPath() ?>" />
30  <? endif ?>
31  <?= \Gino\cutHtmlText(\Gino\htmlChars($n->ml('text')), 80, '...', false, false, true, array('endingPosition' => 'in')) ?>
32  <div class="null"></div>
33  </article>
34  <? endforeach ?>
35  <p class="archive"><a href="<?= $archive_url ?>"><?= _('archivio') ?></a></p>
36  <? else: ?>
37  <p><?= _('Non risultano news registrate') ?></p>
38  <? endif ?>
39 </section>
40 <? // @endcond ?>
Namespace dell'applicazione News