Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@manchumahara
Created September 1, 2016 06:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save manchumahara/3b371216d8b1e73ca38160e22ce93f63 to your computer and use it in GitHub Desktop.
Save manchumahara/3b371216d8b1e73ca38160e22ce93f63 to your computer and use it in GitHub Desktop.
use Joomla\Registry\Registry;
$id = ''; //article id here
require_once JPATH_SITE . '/components/com_content/models/article.php';
$com_content_info = JModelLegacy::getInstance('Article', 'ContentModel', array('ignore_request' => true));
$com_content_info->setState('article.id', $id);
$com_content_info->setState('params', $registry);
$com_content_info = $com_content_info->getItem();
$com_content_attribs = $registry->loadString($com_content_info->attribs);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment