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