2

hello all just now i create

  1. getinfo($id=null){ return $xyz; } function in model
  2. calling above function using $this->xyz=$this->get('info'); in view.html.php file so will be used by info layout
  3. now info layout will called as 'index.php?option=com_student&view=student&layout=info&id=3'

now when i call the info layout using above url the id argument of getinfo method in model automatically populated with the id i supplied in url how joomla doing this

i think there is something that I'm missing

2
  • Please provide the full source code of your model class Commented May 4, 2015 at 12:46
  • sir above is done by joomla default getinfo is the only function that i described here Commented May 5, 2015 at 8:52

1 Answer 1

2

It's simple, main controller of application remember arguments for subcontrollers, so model get same Params from controller. Documentation get answers too ☺ https://docs.joomla.org/JController_and_its_subclass_usage_overview

Regards

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.