I have a managed package that contains a legacy web tab that now needs some more advanced logic to be added to the destination. This all but requires the tab to now point to a visualforce page.
However the problem is that we have a large number of dev and test orgs with unmanaged copies of our code, and hardcoding the namespace prefix in the web tab link would break in these.
I've already tested and the $Page and $Resource globals appear to be unavailable inside the limited merge field capabilities of web tabs.
$ObjectType appears to be available, but so far seems incapable of returning anything but a sObject's key prefix ($ObjectType.Account.fields.name fails to save, while $ObjectType.Account returns the text 001).
What options do I have left for detecting if this org is running an unmanaged or managed copy of the app?