Store page name in the comments file
This commit is contained in:
parent
c18914d3e3
commit
5fd4cd6ac5
|
@ -80,6 +80,7 @@ class CommentsPlugin extends Plugin
|
||||||
];
|
];
|
||||||
} else {
|
} else {
|
||||||
$data = array(
|
$data = array(
|
||||||
|
'name' => $post['name'],
|
||||||
'comments' => array([
|
'comments' => array([
|
||||||
'text' => $post['text'],
|
'text' => $post['text'],
|
||||||
'date' => gmdate('D, d M Y H:i:s', time()),
|
'date' => gmdate('D, d M Y H:i:s', time()),
|
||||||
|
|
|
@ -9,6 +9,7 @@ jQuery(document).on('click tap', '.js__add-new-comment', function(event) {
|
||||||
text: $('.js__new-comment-text').val(),
|
text: $('.js__new-comment-text').val(),
|
||||||
name: $('.js__new-comment-name').val(),
|
name: $('.js__new-comment-name').val(),
|
||||||
email: $('.js__new-comment-email').val(),
|
email: $('.js__new-comment-email').val(),
|
||||||
|
name: "{{ grav.page.header.title }}"
|
||||||
path: "{{ grav.uri.path }}"
|
path: "{{ grav.uri.path }}"
|
||||||
},
|
},
|
||||||
type: 'POST'
|
type: 'POST'
|
||||||
|
|
Loading…
Reference in New Issue