I need to get the TAGS associated with an article in Joomla 3.1.5
I have tried the following but they do not return a string:
echo $article->item->tags->itemTags;
and
$tags = $article->get("tags");
And just for the record I am loading the article info as such (getting the article title works perfectly)
$article = JTable::getInstance("content");
$article->load(JRequest::getInt("id"));
$pageTitle = $article->get("title");
$user =& JFactory::getUser();
If you look in components/com_content/views/article/tmpl/default.php
, the tags are being displayed like so:
if ($this->params->get('show_tags', 1) && !empty($this->item->tags->itemTags)) {
$this->item->tagLayout = new JLayoutFile('joomla.content.tags');
echo $this->item->tagLayout->render($this->item->tags->itemTags);
}
So you can base it on this:
Hope it helps