I need to print my "article title" in Joomla intro text article content. I have this code
$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");
}
This code work fine after the "read more" button but before it does not work... Somebody can help me? I need to print the title in the intro text.
if ($option=="com_content" && $view=="category") {
You then just have to find a way to pull in the article title from the BLOG / LISt view. So you will have two similar chunks of code, one that only fires on the SINGLE article view and one that fires on the BLOG type view. I will try to have a look tomorrow. Personally I would just write an override in the default article template to generate this link as opposed to doing it in each individual article