Hi,
We have a locally developed portlet that I’d like to add to the HomepageComponents variable so that our users can add it to their RT home page.
I can obviously do this by copying the setting of HomepageComponents from RT_Config.pm to RT_SiteConfig.pm and adding our component there. I think that is what is suggested in Writing portlets - RT 5.0.2 Documentation - Best Practical. But I’d need to be careful to keep our copy of HomepageComponents synchronized with the one in RT_Config.pm if I did that. So I was wondering if there is a better way?
I believe $HomepageComponents is an arrayref so in theory I should be able to push my portlet name on to the referenced array if it was already initialized with the default values. But I’m not sure where I could do that, since I think RT_SiteConfig.pm is read before RT_Config.pm so doing it in our site configuration wouldn’t work.
Are there any callbacks that could be used (ie: after LoadConfig() has run but before Init() is called)?
If not, an option I’ve considered but not yet explored would be to define a local plugin that existed solely to add our portlet name to the HomepageComponents arrayref. Is it worth exploring that option - ie: would our plugin initialization happen early enough for it to have an effect?
Any other thoughts would be appreciated.
Thanks,
Duncan