php - How to get the tags associated to an article in Joomla -
i need tags associated article in joomla 3.1.5
i have tried following not return string:
echo $article->item->tags->itemtags;
and
$tags = $article->get("tags");
and record loading article info such (getting article title works perfectly)
$article = jtable::getinstance("content"); $article->load(jrequest::getint("id")); $pagetitle = $article->get("title"); $user =& jfactory::getuser();
if in components/com_content/views/article/tmpl/default.php
, tags being displayed 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 can base on this:
hope helps
Comments
Post a Comment