Update: Spring'14 Release Announcement
If you’re accessing the API using a custom community URL, the describeAppMenu() call retrieves the tab set
associated with the community.
Pre: Spring'14 Answer...
Ok I've done a bit of research here...
- The Network Apex class is now documented in the Winter'14 Apex Developers guide here. Sadly it does not have the getTabs method one would hope to find. Though there is communitiesLanding
'Returns a Page Reference to the default landing page for the community. This is the first tab of the community.'
- Objects. I've also reviewed the full set of Objects and while we have Network, NetworkMember and NetworkMemberGroup. Again tab info is missing.
- Winter'14 Apex Describe. I also took a look at the new Winter'14 Apex Describe feature for Tabs, however this is for regular tab sets not Network ones, sigh...
So this leaves the Metadata API...
Something I happen to know a few tricks about when it comes to calling it from Apex. This is an async API so not easy to call from Apex, but not impossible. The main issue I can see though is the permissions of the users of your Network. Salesforce Metadata API requires Setup and Modify All Data permissions. So I assume this would be a stopper for you in calling the API directly from your page as the users would not have the required permissions anyway?
If so, a couple of thoughts occur...
Develop an Apex Schedule (every hour?) that calls the Metadata API retrieves the Network tab set and outputs it to a Custom Object you can use on your custom page. There would obviously a lag in the Network admin updating things in the Salesforce UI and the information in the Custom 'Network Tabs' Object being updated. Though to address this you could have a 'Run Now' button to force the information to be updated.
Alternative Network Tabs UI. The other option might be to develop your own UI instead the Network Tabs UI, that uses the Metadata API to update the Network Tabs and also your Custom 'Network Tabs' object at the same time, thus keeping the two in sync in real time.
Finally another challenge occurs to me as I write this, the Metadata API is giving a list of tabs irrespective of Object security. So you would need to sub-filter the list by the current user. This might infact be possible by using the aformentioned Winter'14 Apex Describe Tab functionality to filter out tabs that don't exist in both tab sets.
Have a think about the above and give me your feedback, my gut feel is this is one of those battles its better to walk away from and deploy the troops to other areas! That said if you want to fight, I'll join you in the battle! :-)