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

  • Please provide the full source code of your model class – Rob Clayburn May 4 '15 at 12:46
  • sir above is done by joomla default getinfo is the only function that i described here – Sumer Raj Chouhan May 5 '15 at 8:52

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


| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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