gino-news  2.1.0
Modulo News per gino CMS
detail.php
Go to the documentation of this file.
1 <?php
18 ?>
19 <? namespace Gino\App\News; ?>
20 <? //@cond no-doxygen ?>
21  <section itemscope itemtype="http://www.schema.org/NewsArticle" id="news-detail-news-<?= $instance_name ?>">
22  <div class="row">
23  <div class="col-md-12">
24  <h1 itemprop="name"><?= \Gino\htmlChars($news->ml('title')) ?></h1>
25  <p><time itemprop="datePublished" content="<?= $news->dateIso() ?>" pubdate="pubdate" datetime="<?= $news->dateIso() ?>"><?= \Gino\dbDateToDate($news->date) ?></time></p>
26  <? if($news->objCategories()): ?>
27  <p><span class="fa fa-cubes"></span>
28  <? $router = \Gino\Router::instance(); ?>
29  <? foreach($news->objCategories() as $ctg): ?>
30  <a href="<?= $router->link($news->getController()->getInstanceName(), 'archive', array('ctg' => $ctg->slug)) ?>"><?= implode(', ', $news->objCategories()) ?></a>
31  <? endforeach ?>
32  </p>
33  <? endif ?>
34  <? if($news->tags): ?>
35  <p><span class="fa fa-tag"></span> <?= $news->tags ?></p>
36  <? endif ?>
37  </div>
38  </div>
39  <div class="row">
40  <? if($news->img): ?>
41  <div class="col-sm-4 col-xs-12">
42  <img class="img-responsive" src="<?= $news->getImgPath() ?>" alt="<?= _('immagine') ?>" />
43  </div>
44  <div class="col-sm-8 col-xs-12">
45  <? else: ?>
46  <div class="col-sm-12">
47  <? endif ?>
48  <div itemprop="articleBody">
49  <?= \Gino\htmlChars($news->ml('text')) ?>
50  </div>
51  <? if($news->social): ?>
52  <?= $social ?>
53  <? endif ?>
54  <? if($related_contents_list): ?>
55  <h2><?= _('Potrebbe interessarti anche...') ?></h2>
56  <?= $related_contents_list ?>
57  <? endif ?>
58  </div>
59  </div>
60 </section>
61 <? // @endcond ?>
Namespace dell'applicazione News