I want to change the Analytics tabs on user/me/apps page.
In order to show/hide additional tabs under Analytics, I went in to ../profiles\apigee\modules\custom\devconnect\devconnect_developer_apps path and modified devconnect_developer_apps.module file.
The exact function that I modified is _devconnect_developer_apps_detail.
Everything works as expected, for instance in order to hide keys tab, I commented out the following:
// $tabs = array( // array(‘text’ => t(‘Keys’), ‘path’ => ‘#keys’), // );
Now, my question is how can I copy this change to ../sites/all/themes/mytheme? Because when Apigee rolls out any updated/changes, my changes in devconnect_developer_apps.module file will be lost.
You should follow the instructions here, and create a sub-theme.
This allows you to override things from the theme, with no danger of those over-ridden things being over-WRITTEN when Apigee updates the original theme.
Good luck!
Hi Dino,
I got the code base from a third party, and hence everything was pre configured. I know how to override templates, for instance I have copied devconnect_developer_apps_list.tpl.php from profiles\apigee\modules\custom\devconnect\devconnect_developer_apps\templates to sites\all\themes\custom\templates\devconnect and it works.
in order to make the changes in custom modules work, Can i just copy \profiles\apigee\modules\custom\devconnect folder in to sites\all\modules, make changes and install it as a custom module on our portal?
http://docs.apigee.com/developer-services/content/customizing-theme#customizingtheapigeeresponsivetheme dosen’t gives me any indication as to how I can change the core module itself.
Would it be possible for me to change the function itself in all\themes\custom\template.php via some hook_…alter?
The exact function that I want to modify is _devconnect_developer_apps_detail under ../profiles\apigee\modules\custom\devconnect\devconnect_developer_apps\devconnect_developer_apps.module
yes, if you copy a module to sites/all/modules, and then modify it, it will take precedence over other modules. This is just standard Drupal stuff. You can read about that here.
But if you take the copy-and-modify approach, then you own the responsibility of updating the module if Apigee delivers updates.
Yes, as you can see, that function calls drupal_alter with the name “devconnect_developer_app”.
To provide a hook for that alter, you need to provide a module. In that module, provide a function with a name that is the joining of 3 parts, separated by underscore:
- short name of your module
- “devconnect_developer_app”
- “alter”
Suppose you want to write a module called ofs_dc_mod . In that case your module must provide a function called ofs_dc_mod_devconnect_developer_app_alter .
It should be something like this:
function ofs_dc_mod_devconnect_developer_app_alter(&$info){
// change info here. add new properties, or modify existing ones.
$info['dino_was_here'] = 'This can be anything';
}
Thanks a lot Dino.
That helped me a lot.
A question though, I am getting all the app and developer attributes by using dpm($info);, however, I cannot see any UI tabs related info like $panes and $tabs.
If I want to hide Keys tab as defined in the code below:
$tabs = array( array(‘text’ => t(‘Keys’), ‘path’ => ‘#keys’), );
how would i be able to do that from the function and $info variable?