As mentioned in the title, I'd like to know how to call the K2 current item's title & creation date in my template's index.php.
What I'm trying to achieve is to display (if the user is on a K2 item's page ) the title and creation date of a K2 item somewhere else ( in the index.php of my template for example).
The thing is that I'd like to completely move the title/created date from K2 items to a module position on my template.
I've done a lot of researches but couldn't find anything but this, that works well, but only for Joomla article's titles, not K2's:
$option = JRequest::getCmd('option');
$view = JRequest::getCmd('view');
if ($option=="com_content" && $view=="article") {
$ids = explode(':',JRequest::getString('id'));
$article_id = $ids[0];
$article =& JTable::getInstance("content");
$article->load($article_id);
echo $article->get("title");
}
Thanks in advance!