-
Notifications
You must be signed in to change notification settings - Fork 1
/
author.php
54 lines (45 loc) · 1.09 KB
/
author.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
46
47
48
49
50
51
52
53
54
<?php
include('perch/runtime.php');
include('inc/page_vars.php');
$page_vars['body_class'] = 'author';
$page_vars['content_class'] = 'vcard';
$author = perch_content_custom('Authors', array(
'template'=>'authors/author.html',
'page'=>'/authors.php',
'skip-template'=>true,
'return-html'=>true,
'filter'=> array(
array(
'filter'=>'slug',
'value'=>perch_get('slug')
),
array(
'filter'=>'active',
'match'=>'lte',
'value'=>date('Y-m-d')
)
)
));
if (!isset($author[0])) PerchUtil::redirect('/authors/');
$page_vars['page_title'] = $author[0]['firstname'].' '.$author[0]['lastname'];
perch_layout('default/above', $page_vars);
echo $author['html'];
perch_content_custom('Articles', array(
'template'=>'articles/author_listing.html',
'page'=>'/2*',
'filter'=> array(
array(
'filter'=>'author',
'value'=>perch_get('slug')
),
array(
'filter'=>'date',
'match'=>'lte',
'value'=>date('Y-m-d')
)
),
'sort'=>'date',
'sort-order'=>'DESC'
));
perch_layout('default/below');
?>