0

I am an newbie to Joomla. I have created an new component with help of this http://joomlacomponentcreator.codelydia.com/ website.

Now i need to get the values from component and display it in fronted with help of module. Similar to banner module.

Can anyone help me out

Sangeetha Mani
  • 71
  • 1
  • 1
  • 5

2 Answers2

0

Well if you have a model for your component, which gets data from the database, you should create an Instance of that model in your module like this:

jimport( 'joomla.application.component.model' );
JModelLegacy::addIncludePath( JPATH_SITE.'/components/com_mycompo/models', 'YourModel' );
$model = JModelLegacy::getInstance( 'Items', 'YourModel' ); 

Then you use a model method to get the data you want:

$data = $model->getData();
Mike
  • 5,416
  • 4
  • 40
  • 73
0

If you create the component using http://www.component-creator.com you will get many more features such as full ACL support, SQL import, front end editing and many more types of fields including foreign key fields. And as a bonus you can also build a module that can display your data.

Søren Beck Jensen
  • 1,676
  • 1
  • 12
  • 22