joomla-extensions

How to use multiple models in joomla MVC Component

邮差的信 提交于 2019-11-29 05:10:11
I am using different model in joomla than view's own model that is similar to its name by assigning it from controller, like: $view->setModel($this->getModel('user')); Now how can I use its method getSingleUser($user_id) in view. In an example in joomla documentation , it is using is some thing like this: $this->get("data1","model2"); So I assume data1 is name of method in model2? If so then how can I pass argument that is userid in my case. I know this is easy thing that many of joomla developers have done but I am sort of jack of all sort of developer and new to joomla so I am expecting you

Joomla component: Output without html

雨燕双飞 提交于 2019-11-28 13:32:58
I am developing a Joomla component for Joomla 2.5. Since it's supposed to output XML, I most defenitely don't want to display the surrounding template. I have tried appending to the url: ?tmpl=component ?format=raw ?tmpl=raw But the first will generate some HTML around the content output and the second gives me a 500 error. The third one generates no output at all. I assume it's looking for a template named "raw", because any other gibberish template name I put there gives me the same result. How can I output XML from my component without any of the additional Joomla + template HTML?

save form field in component params joomla

☆樱花仙子☆ 提交于 2019-11-28 09:41:16
问题 I am using joomla 2.5, I am working on custom component of joomla . I have created the form in backend admin page. what i need is , i want to save the post data of form in params row of that component in database of #_extensions . Here is my tables/component.php <?php defined('_JEXEC') or die('Restricted access'); jimport('joomla.database.table'); class componentTablecomponent extends JTable { function __construct(&$db) { parent::__construct('#__extensions', 'extension_id', $db); } public