How to use Joomla Model function into a module or plugin ?

You can use Joomla model function into a module/plugin or another joomla extension using following code. Following example shows us how to show a joomla article in a custom extension. jimport(‘joomla.application.component.model’); JModel::addIncludePath(JPATH_SITE . ‘/components/com_content/models’); $Model = JModel::getInstance(‘Article’, ‘ContentModel’); $articleId = ‘1’; //We used here ‘1’ article id $article = $Model->getItem($articleId); echo $article->introtext; Output : [Continue reading “How to use Joomla Model function into a module or plugin ?”

Call Joomla module in a component

Generally modules are call by its position in Joomla. In template file we define positions for module then active module in backend and set the position for display. But if you want to display a module in a component then following code will be helpful. We can add a joomla module in a component byContinue reading “Call Joomla module in a component”