mirror of
https://github.com/danpros/htmly.git
synced 2026-04-20 04:26:22 +05:30
Missing views var for page/subpage
This commit is contained in:
parent
53dde169d8
commit
6b2922e9a1
2 changed files with 21 additions and 3 deletions
|
|
@ -1327,6 +1327,8 @@ function find_draft_page($static = null)
|
|||
|
||||
if (config('views.counter') == 'true') {
|
||||
$post->views = get_views($post->file);
|
||||
} else {
|
||||
$post->views = null;
|
||||
}
|
||||
|
||||
$post->description = get_content_tag("d", $content, get_description($post->body));
|
||||
|
|
@ -1382,7 +1384,11 @@ function find_draft_subpage($static = null, $sub_static = null)
|
|||
// Get the contents and convert it to HTML
|
||||
$post->body = MarkdownExtra::defaultTransform(remove_html_comments($content));
|
||||
|
||||
$post->views = get_views($post->file);
|
||||
if (config('views.counter') == 'true') {
|
||||
$post->views = get_views($post->file);
|
||||
} else {
|
||||
$post->views = null;
|
||||
}
|
||||
|
||||
$post->description = get_content_tag("d", $content, get_description($post->body));
|
||||
|
||||
|
|
|
|||
|
|
@ -562,6 +562,8 @@ function get_pages($pages, $page = 1, $perpage = 0)
|
|||
|
||||
if (config('views.counter') == 'true') {
|
||||
$post->views = get_views($post->file);
|
||||
} else {
|
||||
$post->views = null;
|
||||
}
|
||||
|
||||
$post->description = get_content_tag("d", $content, get_description($post->body));
|
||||
|
|
@ -613,7 +615,11 @@ function get_subpages($sub_pages, $page = 1, $perpage = 0)
|
|||
// Get the contents and convert it to HTML
|
||||
$post->body = MarkdownExtra::defaultTransform(remove_html_comments($content));
|
||||
|
||||
$post->views = get_views($post->file);
|
||||
if (config('views.counter') == 'true') {
|
||||
$post->views = get_views($post->file);
|
||||
} else {
|
||||
$post->views = null;
|
||||
}
|
||||
|
||||
$post->description = get_content_tag("d", $content, get_description($post->body));
|
||||
|
||||
|
|
@ -705,6 +711,8 @@ function find_page($static = null)
|
|||
|
||||
if (config('views.counter') == 'true') {
|
||||
$post->views = get_views($post->file);
|
||||
} else {
|
||||
$post->views = null;
|
||||
}
|
||||
|
||||
$post->description = get_content_tag("d", $content, get_description($post->body));
|
||||
|
|
@ -789,7 +797,11 @@ function find_subpage($static, $sub_static = null)
|
|||
// Get the contents and convert it to HTML
|
||||
$post->body = MarkdownExtra::defaultTransform(remove_html_comments($content));
|
||||
|
||||
$post->views = get_views($post->file);
|
||||
if (config('views.counter') == 'true') {
|
||||
$post->views = get_views($post->file);
|
||||
} else {
|
||||
$post->views = null;
|
||||
}
|
||||
|
||||
$post->description = get_content_tag("d", $content, get_description($post->body));
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue