Hi, I was wondering if you guys could tell me how to obtain the title of the current activ blog item with php?
I want to insert the title in a custom module. thanks.
I want to insert the title in a custom module. thanks.
<?php
$view = JRequest::getVar('view');
$blog = EasyBlogHelper::getTable('blog');
$blog->load(JRequest::getVar('id')); // get the current blog id
if ($view == 'entry' && $blog->title) {
echo '<h1>' . $blog->title . '</h1>';
} else {
echo '<h1>Artikler</h1>';
}
$blog = EasyBlogHelper::getTable('blog');
$blog->load('3'); // 3 is the ID of the current blog.
echo $blog->title;
$blog = EasyBlogHelper::getTable('blog');
$blog->load(JRequest::getVar('id')); // get the current blog id
echo $blog->title;
<?php
$blog = EasyBlogHelper::getTable('blog');
$blog->load(JRequest::getVar('id')); // get the current blog id
if($blog->title){
echo '<h1>'.$blog->title.'</h1>'; ;
}else{
echo '<h1>'.'Artikler'.'</h1>';
}
?>
<?php
$blog = EasyBlogHelper::getTable('blog');
$blog->load(JRequest::getVar('id')); // get the current blog id
if($blog->title){
echo '<h1>'.$blog->title.'</h1>'; ;
}else{
echo '<h1>'.'Artikler'.'</h1>';
}
?>