Hello,
Happy to be using cook again. Hope you're all having a great time.
Com_suivi -> Students ->progressionof students
There is a relation field called "progression", which in the table "progressions" is togglable, but is not in the view created within the "students" table (hope i make sense)
Would like this to be togglable too. Tried to add a task in construct in "students" model but no success so far.
A hint ? A solution ? A kiss ?
Thanks all
You request is a bit complex and cannot be achieved without some manual coding
You did right to create a function in the controller, but in wich controller did you wrote it ?
It should be written in the progression table, and then try to find a way to catch the correct progression ID value for sending to the controller.
The N:1 list should load two values : the ID of the "progression", and the boolean value to display.
With this two informations, you might be able to code it easily.
Well the toggle code is present in the progression controller
public function toggle()
{
JSession::checkToken() or JSession::checkToken('get') or jexit(JText::_('JINVALID_TOKEN'));
$this->_result = $result = $this->_toggle(array(
'toggle_finished' => 'finished'
));
$model = $this->getModel();
//Define the redirections
switch($this->getLayout() .'.'. $this->getTask())
{
case 'default.toggle':
$this->applyRedirection($result, array(
'stay',
'com_suivi.progressions.default'
), array(
'cid[]' => null
));
break;
default:
$this->applyRedirection($result, array(
'stay',
'stay'
));
break;
}
}
Suppose i should add that code, with adaptations, into the Student controller, as progressionOfStudents is a view of that table. Is it the right path ?
Thanks bro'
Let me first state that this is an amazing and fascinating product exactly what I was looking for. In just a few hours (listening to the very well made and clearly understandable videos learning doing) I completed and installed my first component. I am now in the second refining phase. I will make a recommenation in JED. Thanks for the effort in creating such a great product. Incidentally some of the best Joomla extension I use are of French origin ! Giori (Forum)