Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9236157
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T07:13:17+00:00 2026-06-18T07:13:17+00:00

Since Joomla 2.5 I can call functions from the default model now with this

  • 0

Since Joomla 2.5 I can call functions from the default model now with this code:

$result = $this->get('Data');

Where get and Data together are leading to the function name “getData”.
But I cannot do this:

$myModel = $this->getModel('special_model');
$result = $myModel->getData();

and I can also not do:

$myModel = $this->getModel('special_model');
$result = $myModel->getData('myId');

So, I can’t call a method directly and also not with a parameter? Is it correct? Why is it like this? In J!1.5 this was possible.

Best Regards
Björn

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-18T07:13:18+00:00Added an answer on June 18, 2026 at 7:13 am

    What you have actually will work in J2.5, but you have to add one more piece. That should work as is if you are in the ‘special_model’ view. Based on the naming though, you are trying to add a second model to the view. This model has to be added to the view from the controller:

    $view = $this->getView('myview', 'html') ;
    $view->setModel( $this->getModel( 'special_model' )) ;
    

    Again, add that to the controller, and the code you have will work in the model.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Since each thread has its own stack, its private data can be put on
I have some code that i can insert into my Joomla 3.0 page that
Since Joomla 2.5 supports PostgreSQL natively and we're very in favour of that one.
Since now I have only used plugin for editing and the way I use
Since input and raw_input() stop the program from running anymore, I want to use
Since I have no errors I don't know if this is the right place
i want to install a video component in Joomla,,,, since I am new to
Since I'm new to Joomla I would like to know whether there is a
When I was playing around with Joomla! source code, I saw such as code
We've got a joomla website and are now in the process of developing a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.