Hello here !
As mentionned in title, I'd like to know how to call the K2 current item's title / creation date on my template index.php ?
What I'm trying to achieve is to display (if user is on a K2 item's page ) the title and creation date of a K2 item somewhere else ( in my index.php of my template for example ).
The thing is that I'd like to completely move the title/created date from K2 item to a module position on my template.
I've done a lot of researches but couldn't find anything but this, that work well but only for Joomla article's titles, not K2's : p
Thanks in advance !
As mentionned in title, I'd like to know how to call the K2 current item's title / creation date on my template index.php ?
What I'm trying to achieve is to display (if user is on a K2 item's page ) the title and creation date of a K2 item somewhere else ( in my index.php of my template for example ).
The thing is that I'd like to completely move the title/created date from K2 item to a module position on my template.
I've done a lot of researches but couldn't find anything but this, that work well but only for Joomla article's titles, not K2's : p
$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 !