I am currently developing a Joomla 1.7 website, And I am using J2Store shopping Cart so I have to make make an article for every Product.
Then to display I create a Joomla Featured Articles Menu Item for the appropriate Category, my problem is this, The default Article Title isn't really appropriate for the page layout and because there will be many products / articles so as a time saver I would like to include some PHP code to retrieve the Article Title I have tried the following used in conjunction with the Sourcerer plugin.
<?php echo JFactory::getDocument()->getTitle(); ?>
But unfortunately it displays the Menu Title not the individual Article Titles, I also found the following code but I cant get it to work with Joomla 1.7
<?php
$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");
} ?>