Hi,
I want to hide a bunch of subpanels on Accounts and Contacts.
I have found several posts on this, but they seem a little old and the directory structure seems a little different.
The advice seems to be âcreate a custom php file in custom/modules/Accounts/Ext/Layoutdefs/â with unsert lines to remove the elements from the subpanel_setup array.
I have created:
custom/modules/Accounts/Ext/Layoutdefs/disable-panels.php
<?php
[code]
unset($layout_defs['Accounts']['subpanel_setup']['bugs']);
[/code]
?>
And hit repair / rebuild all. Nothing happens. Panels are not hidden.
If I add the unset lines to
custom/modules/Accounts/Ext/Layoutdefs/layoutdefs.ext.php
instead the panels are hidden instantly. However that file has an auto generation warning, so I want to avoid using it.
What am I missing?
Thanks,
Paul
you want to hide them just for those two modules or globally? because you know that thereâs an option to hide globally right?
best regards
canât you just hide them via the Admin UI?
Ah. Thanks. The title line on that page left me a little unsure, but, yes, it works⌠mostly.
Even though I disabled the Products module completely and hid itâs sub panel the âProducts Purchasedâ appears on the Account detail view. So I hid that one with a custom unset. I expect there will be a few of these lurking around.
Anyway I solved my original problem.
⌠so it seems if I drop the custom file into:
custom/Extension/modules/Accounts/Ext/Layoutdefs/
instead it works on a Repair/Rebuild.
What is the best place for documentation, blogs, wikiâs for these kind of customisation? Is this forum the best place?
In version 7.10.5 what I did was just comment, //, in âŚ/modules/Accounts/metadata/subpaneldefs.php:
//âproducts_services_purchasedâ => array(
// âorderâ => 104,
//âmoduleâ => âAOS_Products_Quotesâ,
//âsubpanel_nameâ => âForAccountsâ,
//âget_subpanel_dataâ => âfunction//:getProductsServicesPurchasedQueryâ,
//âtitle_keyâ => âLBL_PRODUCTS_SERVICES_PURCHASED_SUBPANEL_TITLEâ,
//),
It worked, before and after Repair and Rebuild
Iâm guessing itâs the equivalent of âunsettingâ but I just commented out everything inside the subpanel definition file that was generated when the relatinoship was built.
So the contents of custom/Extension/modules/[MODULE]/Ext/Layoutdefs/[GENERATED_SUB_PANEL_FILE].php
For some reason the unset approach didnât work for me
Guys, I have created a simple custom module for approval/rejection , I just want to hide the options in the âActionâ button partially for the users untill the approval status becomes approved, by default the status will be pending at that time the user should not have any option in the Action button in detailview only when the status changes to approved ,all the options should be shown . Can anyone help me to do this by any ideas âŚ
Even it is not working for me. I am trying to hide a particular subpanel.
I commented a file that was generated and now I donât see that subpanel after QR&R 