[SalesForce] NavigatetoURL Visualforce page for Salesforce1

Is there a blanket template covering the ability to create visualforce pages (containing navigatetoURL code) for internal company URLs that can be used on the Navigation tabs on Salesforce1?

Best Answer

The closest thing that I know of to what you're looking for would be found in the Salesforce1 Mobile App Developer Guide under Creating Visualforce Pages That Work in Mobile and Desktop.

Ideally, one uses Actions for navigation in Salesforce1, but if you're using Visualforce pages for both desktop and Salesforce1, you can include code that looks something like what's below:

// Go back to the Account detail page
if( (typeof sforce != 'undefined') && sforce && (!!sforce.one) ) {
    // Salesforce1 navigation
    sforce.one.navigateToSObject(aId);
}
else {
    // Set the window's URL using a Visualforce expression
    window.location.href = 
        '{!URLFOR($Action.Account.View, account.Id)}';
}

For more on this, also see Navigation with the sforce.one Object which includes information on the sforce.one.navigateToURL(​url​[, isredirect]) function.

Edit

By "internal company URL", I assume you're referring to a link that's not within your Salesforce instance? If so, from the Docs:

Relative and absolute URLs are supported. Relative URLs are relative to the one.app domain, and retain navigation history. External URLs—that is, URLs that are outside the Salesforce1 app—open in a separate browser window.

If you want to have support to browse to links that are outside the one.one app domain, but within your company's company's domain without leaving the app, you'd need to create a custom Salesforce Mobile App for your org using the Mobile APIs available to you. Otherwise, the standard Salesforce1 App will send your users to their default browser when you navigate them to a link that's outside the one.one app domain.