More than 1000+ satisfied clients and counting, since 2010

Blog

Global Article Parameters in Joomla & Howto Get it

Joomla content management system is an easy to use CMS. It has a unique blend of advanced and user friendly features. Using it you can easily play with any global article parameters in Joomla. This blog post highlights the different ways to get global parameters in Joomla.

How to Get Global Article Parameters in Joomla

Load the model for the article

// Get an instance of the generic articles model
 $model = JModel::getInstance('Article',
 'ContentModel',
 array('ignore_request' => true));

Fetch the article using

$model->getItem($id);

Fetch the global parameters of the component

$params = &JComponentHelper::getParams( 'COMPONENT_NAME' );

Alternate Method to Get Global Article Parameters in Joomla

Get article specific codes using the following code,

$db =& JFactory::getDBO();
 $query = 'SELECT * FROM #__content WHERE id='.$id.' AND state=1';
 $db->setQuery($query);
 $item = $db->loadObject();
 $attribs = json_decode($item->attribs, true);

Fetch specific article parameters using,

array(26) {
 ["show_title"]=>
 string(0) ""
 ["link_titles"]=>
 string(0) ""
 [...]
 }

Get the global configuration using the query,

SELECT params from #__extensions where extension_id=22;

By using any of the two methods you can get global article parameters in Joomla. But if you face any difficulty, then hire a professional. Request a quote with us today and get immediate assistance from a dedicated team of experts.

Written by

The author didnt add any Information to his profile yet