ProBlog

A powerful October CMS Blog plugin. Boost your SEO with robust blogging tools by Radiantweb.

Back to ProBlog Support

paulgrafx
paulgrafx

Is it possible to get the current 'post id' on the 'function onStart' on the blog-post.htm ?

[proBlogPost]
slug = ":slug"
==
function onStart()
{
    // 
}
==

Last updated

ndcisiv
ndcisiv

This should work.

[proBlogPost]
slug= ":slug"
==
use Radiantweb\Problog\Models\Post as PostModel;

function onStart()
{
    $post = PostModel::where('slug','=',$this->param('slug'))->first();
    // $post->id;
}
==
paulgrafx
paulgrafx

Thanks ndcisiv

Works Great :)

1-3 of 3