How to add a subpanel of tasks for module opportunities

I checked the relationship definition of the module opportunities and found that there is the one-many relationship between opportunities and tasks, but the thing is I failed to create a subpanel for tasks on the opportunity info page.
This is just one of the similar issues I confronted. And I suppose I am not alone.
Who can give me some tips? I appreciate very much.

That subpanel is integrated into the the “Activities” subpanel in Opportunities detail view. You should be able to see your Tasks there, along with other kinds of Activities.

Thank you for your quick response.
But what I want is task as a module related to opportunity showing as subpanel, not activities. They are different I think.
The creation page of task is shown as below:
http://prntscr.com/nzp1a3

You can’t add a new subpanel from Studio (unless you create a new relationship, which I think will confuse things).

If you can handle some PHP you can try adding it manually, something like this: https://suitecrm.com/suitecrm/forum/suitecrm-7-0-discussion/19222-subpanels-cases#66668

I suggest you first try to use that example exactly as it is, and get it to work; only then start changing it to fit your needs.

This will just be a new subpanel, I don’t think it will be much different from the existing functionality in Activities…

Thank you very much for your guide.
I know some PHP, not too much, but feel I can make it by following the tutorial step by step.
But the thing is I found that the tutorial is showing how to add a subpanel of lead for module account, and I checked my two instances and found that in both instances, the lead is an existing subpanel of module account.
That turns out that I can’t verify the example first then carry out what I want by using the verified method.
I will have to try to add a subpanel by using the method the example is showing.
I will get you updated.

Yes that subpanel already exists, what we’re doing is we’re redefining it (overriding the default definition)

Unfortunately, I failed.
My attempts also caused the studio stop working. And the contact, to which I wanted to add a subpanel of note, stopped working too.
I am not quite willing to reconcile to that. Since I hope that I am able to customize the system flexibly by this means.
Can you tell me where I can find the manual regarding $layout_defs[“Accounts”][“subpanel_setup”][‘leads’]?
In order to meet my requirement, I have modified it as $layout_defs[Contacts"][“subpanel_setup”][‘notes’].
Another issue I found is the definition of ‘title_key’ .
In the example, it is ‘title_key’ => ‘LBL_LEADS_SUBPANEL_TITLE’. And I checked, found that LBL_LEADS_SUBPANEL_TITLE has been defined in module leads.
The thing is I found I can’t define 'LBL_NOTES_SUBPANEL_TITLE in module notes.
With an undefined parameter, no wonder the function doesn’t work.
Do I need to hack the source code regarding the definition of module notes?
Can you tell me how or tell me which part of development manual I should read?
Thank you.

I re-used an existing label, but to create a new one please check

https://docs.suitecrm.com/developer/language-strings/

Also, make sure you are checking both your logs. The PHP log is essential to see if you’re missing some “;” or “]” that is breaking you PHP. For those cases where Studio stops working it is surely a case of broken PHP.