-if (!isset($Article->raw) and $User->admin("edit {$Article->link}")) {
- # open template as initial contents
- $Article->raw(file_exists("$Page/template.inc.html") ? "$Page/template.inc.html" : 'template.inc.html');
- $Article->meta['article:author'] = '/' . $User->dir;
+if (!isset($Page->raw) and $User->admin("edit {$Page->link}")) {
+ # open bottom template as initial contents
+ $template = 'template.inc.html';
+ if ($Page->handler and file_exists("{$Page->handler}/$template")) {
+ $template = "{$Page->handler}/$template";
+ }
+ $Page->raw($template);
+ $Page->meta['article:published_time'] = date('Y-m-d h:i:s O');
+ $Page->meta['article:author'] = '/' . $User->dir;