-
Notifications
You must be signed in to change notification settings - Fork 33
/
page-categories.php
45 lines (42 loc) · 2.02 KB
/
page-categories.php
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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
<?php
/**
* Template Page of Category
*
* @package custom
*/
?>
<?php if (!defined('__TYPECHO_ROOT_DIR__')) exit; ?>
<?php $this->need('component/header.php'); ?>
<div id="main" class="main" role="main">
<div class="main-inner">
<div class="content-wrap is-category">
<?php $this->widget('Widget_Metas_Category_List')->to($categorys); ?>
<?php if ($categorys->have()) : ?>
<?php while ($categorys->next()) : ?>
<?php if ($categorys->count) : ?>
<h1 class="category-title" itemprop="name headline">
<a class="category-title-link" itemprop="url" href="<?php $categorys->permalink(); ?>"><?php $categorys->name(); ?></a>
<span> :<?php $categorys->count(); ?></span>
</h1>
<?php endif; ?>
<?php $catlist = $this->widget('Widget_Archive@categorys_' . $categorys->mid, 'pageSize=10000&type=category', 'mid=' . $categorys->mid); ?>
<?php if ($catlist->have()) : ?>
<div class="category-post-item">
<?php while ($catlist->next()) : ?>
<div class="category-post-wrap ">
<article class="category-post" text-center itemscope itemtype="http://schema.org/BlogPosting">
<a href="<?php $catlist->permalink() ?>">
<h2 class="category-post-title"><?php $catlist->title() ?></h2>
</a>
<?php $catlist->date('M j, Y'); ?>
</article>
</div>
<?php endwhile; ?>
</div>
<?php endif; ?>
<?php endwhile; ?>
<?php endif; ?>
</div>
</div>
</div>
<?php $this->need('component/footer.php'); ?>