Welcome the Technical Support section. Help us in assisting you by providing us with a concise and descriptive elaboration of your issues. Be specific and if possible, provide us with a step-by-step instruction in replicating your problem.
ISSUE SUMMARY:
I would like to use modProfileUserinfo() in an override of the frontpage base.php view template.
I'm trying to use the modProfileUserinfo function to display the focus area of the user in the main frontpage area if the person is logged in.
Could you please provide me the code that would successfully load the profile so I can access the function in modProfileUserinfo() function without erroring out.
For example (this doesn't work...):
$my = CFactory::getUser();
$profile=CFactory::getModel('profile')
$myprofile = $profile->getProfile($my-id);
$myprofile->view('profile')->modProfileUserinfo();
modProfileUserinfo() is function, not array value :)
I'll suggest you to pull data directly from db rather than load functions (it will be a bit complicated to make them available for that file).
- Instead of saying: 'it's not working', explain the problem in detail.
- Screenshots with the URL visible in them and the problem marked are more than welcome.
- Tell us how to replicate the problem, we can't fix it if we can't find it.
- Make sure that your site/server meets JomSocial System Requirements
- Make sure to setup JomSocial Cron Job
- Always provide us with access details to the backend and ftp. We need it to debug problems.
- If you have a similar problem, but a solution you found isn't working, open a new thread instead of 'merging' with an existing one.
- Use the "Thank You" feature on any post that helped you
Thanks for the suggestion. Previously everything was working with....
$this->view('profile')->modProfileUserinfo(), however when I installed jomsocial profile types from ready bytes, it broke what was working.
Unfortunately it's sometimes hard to determine what $this is and why it's now broken.
I may recomposite the material from the view in the FrontPage override like you mentioned with the data from the db.