For Joomla! 2.5 Coding related discussions, please use: http://groups.google.com/group/joomla-dev-general
Note: All 1.6, 1.7 and 3.5 releases have reached end of life and should be updated to 3.x.

Moderator: ooffick

Forum rules
Please use the mailing list here: http://groups.google.com/group/joomla-dev-general rather than this forum.
Joomla! Apprentice
Joomla! Apprentice
Posts: 26
Joined: Thu Mar 08, 2007 6:44 am


Postby dave1167 » Sun Apr 01, 2012 8:10 am

I am developing my first component in 2.5. I have adapted the code from the excellent tutorial http://docs.joomla.org/Developing_a_Model-View-Controller_%28MVC%29_Component_for_Joomla!2.5_-_Part_01

The view I am trying to design has two panels the left hand panel will display normal names addresses etc, the right panel will display records linked specifically to the name (or id) on the left hand panel. I have got the Left hand panel working ok using Jforms. I am struggling to get the right hand panel to work

This is the code I am using

Code: Select all

 // this will load code for the left hand panel
$form = $this->get('Form');               
      $item = $this->get('Item');
      $script = $this->get('Script');
               // This section will load data for the right hand panel
                $form = $this->get('Form','awarded');   // The second paramter should overide the  default         
      $item = $this->get('Item',awarded);
      $script = $this->get('Script');

Where it seems to struggle is this line

Code: Select all

$form = $this->get('Form','awarded');

Looking at the source code in view.php I would have thought if I passed another model as the second parameter (awarded) it would then execute the code within that model similar would happen for

When it gets to this line 473 in view.php

Code: Select all

if (isset($this->_models[$model]))

It does not recognise the model and just returns a string of 'award' I have checked the model and it does exist

Firstly am I using the get(From) call correct?

What else do I need to do to get the model recognised?


Return to “Joomla! 2.5 Coding”

Who is online

Users browsing this forum: No registered users and 6 guests