-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathkarlskrona-blog-start.html
30 lines (24 loc) · 1.54 KB
/
karlskrona-blog-start.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
<?php $this->yellow->layout("header") ?>
<?php if ($this->yellow->page->get("blogWithFilter")): ?>
<h1><?php echo $this->yellow->page->getHtml("titleContent") ?></h1>
<?php endif ?>
<?php $pages = $this->yellow->page->getPages("blog")->paginate($this->yellow->system->get("blogPaginationLimit")) ?>
<?php foreach ($pages as $page): ?>
<?php $page->set("entryClass", "post") ?>
<?php if ($page->isExisting("tag")): ?>
<?php foreach (preg_split("/\s*,\s*/", $page->get("tag")) as $tag) { $page->set("entryClass", $page->get("entryClass")." tag-".$this->yellow->lookup->normaliseArguments($tag, false)); } ?>
<?php endif ?>
<article class="<?php echo $page->getHtml("entryClass") ?>">
<header class="entry-title">
<h2><a href="<?php echo $page->getLocation(true) ?>"><?php echo $page->getHtml("title") ?></a></h2>
<p><?php echo $page->getDateHtml("published") . " " . $this->yellow->language->getTextHtml("blogBy") . " "; ?>
<?php $authorCounter = 0; foreach (preg_split("/\s*,\s*/", $page->get("author")) as $author) { if (++$authorCounter>1) echo ", "; echo "<a href=\"".$this->yellow->page->getLocation(true).$this->yellow->lookup->normaliseArguments("author:$author")."\">".htmlspecialchars($author)."</a>"; } ?>
</p>
</header>
<p>
<?php echo $this->yellow->toolbox->createTextDescription($page->getContentHtml(), 0, false, "<!--more-->", "<a href=\"".$page->getLocation(true)."\">".$this->yellow->language->getTextHtml("blogMore")."</a>") ?>
</p>
</article>
<?php endforeach ?>
<?php $this->yellow->layout("pagination", $pages) ?>
<?php $this->yellow->layout("footer") ?>