Reference - URL Format for Links in Apps

The URL field for Links, Jump Links, Media, etc allow you to specify paths to objects referenced by your Mag+ app. Below you'll find information as to the syntax used for the different kinds of URLs.

Note: These URL formats work in Mag+ 5.0 or later. To see what is available for older Mag+ versions, refer to the bottom section of this article.

Jump Links

Jump Links take the user to content within the current issue.

The URL format is jump://<vertical>/<block-id> where <vertical> can be:

  • A specific Vertical ID
  • $current, $next, $previous, $last, $first

The Vertical ID for an open InDesign layout can be found in the Mag+ Vertical panel, in the field labeled "ID". The variables $current, $next, etc reference specific Verticals in the issue, namely the current Vertical, the next Vertical, the previous Vertical, etc.

Example: jump://VerticalA

(Optional) <block-id> references a specific object in the Vertical and can be:

  • A specific Block ID

The Block ID can be found by clicking on an object in InDesign, going to the Mag+ Object panel, and looking at the field labeled "Object ID". The variables $top and $bottom reference specific blocks at the top or bottom of the specified Vertical, respectively.

Example: jump://VerticalA/x123

Media

Media URLs are used for toggling the play/stop state of an audio or video file.


The URL format is media://<media-id>/<action> where <media-id> is a media identifier.

Example: media://m705

Note: When you use the Mag+ Object panel to add a media file, a Hotspot and Media box will be automatically created and tagged with a system-generated Media ID. The Media ID can be seen by clicking on the Media box on the Media Areas layer. The Hotspot box will have its URL filled out automatically to link to the Media box.

(Optional) <action> allows you to specify an action to be performed by the linked Hotspot and can be:

  • toggle: (Default behavior) Toggles the play/pause state of the media
  • play: Starts playing the media (it will not pause media that is playing)
  • pause: Pauses the media (it will not play media that is already paused)

Example: media://m705/toggle

Note: The <action> tag is useful if you want to create separate, distinct controls for toggling, playing, or pausing media. To automatically change images based on the state of the media (including how to create a custom progress bar), read the article "Adding Control Images for Video and Audio".

Popups

This URL is used for toggling the visible/hidden state of a Popup.

The URL format is popup://<block-id>/<action> where <block-id> is a block identifier.

The Block ID can be found in the Mag+ Object panel by selecting an object on one of the the Popup layers (Ap - Popup - Main Tower, Bp - Popup - Pinned Blocks, Bp - Popup - Main Content). The Block ID is listed as "Object ID".

To learn more about creating Popups, read the article "Adding Popups".

Example: popup://watch

(Optional) <action> allows you to specify an action to be performed by the linked Hotspot and can be:

  • toggle: (Default behavior) Toggles the Popup's visibility
  • open: Opens a hidden Popup (it will not hide a visible Popup)
  • close: Closes a visible Popup (it will not show a hidden Popup)

Example: popup://watch/toggle

Internal App Functions

These URLs control accessing content and functionality within your app, outside the scope of the currently displayed issue.

Note: All internal URL formats can also be accessed from third party apps by replacing <internal> with the registered app schema name. App schema names are visible in the Mag+ Publish portal under Admin -> General settings. Be aware that third-party apps must point to apps already installed on a user's device and they will simply open the Mag+ app, not display the specific space. If the Mag+ app is not installed, the link will not work and will not take the user to the App Store.

There are two types of internal URLs: URLs targeting Spaces and URLs targeting content. Spaces are the different screens within your app that are shown when a user clicks on a menu bar or navigation icon. Content URLs allow you to link to content within other issues or directing a user to content in iTunes.

Spaces

The URL format for targeting Spaces is internal://<space>/<action> where <space> can be:

  • bookmarks: Opens the bookmarks screen
  • help: Opens the embedded Help issue
  • library: Opens the Issues space which displays content for sale or that has been purchased
  • live: Opens the URL to the Live web feed you have specified in the Mag+ Publish portal
  • my_account: Opens the My Account space (only used by apps that have integrated with the Mag+ Subscription API)
  • now_reading: Opens the issue currently being read by the user
  • share: Opens the app's Sharing function to share content via e-mail, Twitter, Facebook, etc
  • subscriptions: Opens a popup displaying available subscriptions
  • toc: Opens the Table of Contents of the issue
  • scrubber: Opens the menu/scrubber bar as an alternative to a quick tap or tap and hold anywhere on vertical (using internal://scrubber/on will always only show the menu/scrubber if not already showing and internal://scrubber/toggle will show or hide it based on the current state)
Note: Some Spaces require set-up in the Mag+ Publish Portal to be available within an app. You can read the article "Build Your iOS App" or read "Build Your Android/Kindle Fire App" for information on what Spaces require configuration to be visible.

The only <action> supported is:

  • open: Opens the specified Space

Example: internal://help/open

External Issues

The URL format for opening content in other issues is internal://issue/<identifier> where <identifier> is the Issue ID or GUID of the content you are opening.

Example: internal://issue/13882

Finding the Issue ID

  1. Log into the Mag+ Publish Portal.
  2. Click on the Issues tab at the top.
  3. The Issue ID is listed beneath the issue name.

Finding the GUID

  1. Log into the Mag+ Publish Portal.
  2. Click on the Issues tab at the top.
  3. Click on the issue name to bring up the Issue Details screen.
  4. The GUID is listed under the Device name.
Note: The GUID is basically the name of the uploaded MIB without the .mib extension. It is, however, recommended that you use the Issue ID when linking to content in other issues, so that your app will display the MIB appropriate for the device on which it is viewed.

iTunes Content (iOS Devices Only)

The URL format for opening content in iTunes is internal://itunes/<sub-type>/<identifier> where <sub-type> is:

  • app: For iOS apps
  • album: For a music album
  • artist: For a an artist or app seller
  • book: For an iBooks ebook
  • podcast: For a podcast
  • movie: For a movie
  • tv-season: For a TV series season

Additional sub-types supported by iOS 6 and higher

  • album-track: For a specific track on a music album
  • podcast-track: For a specific episode of a podcast
  • tv-season-episode: For a specific episode of a TV series

<identifier> is the Apple Product ID as specified in iTunes Connect or visible in the iTunes Store.

Example: internal://itunes/app/433149149

Finding the Apple Product ID of iTunes Content

  1. Open iTunes and search for the item you will link to.
  2. Click on the item to display its Details screen.
  3. Click on the downward arrow next to the "Buy" or "Downloaded" button.
  4. Select "Copy Link" from the drop-down menu.
  5. Paste the link in a text document.
  6. Make note of the number in the link which appears next to the text "id".

Example: https://itunes.apple.com/us/app/mag+-reviewer/id433149149?mt=8

The Product ID is highlighted in bold above.

Note: The length of the Product ID varies with the type of content (app, movie, album, etc).

External Web URLs

The URL format for opening content in a new browser window is open<presentation>-<subschema> where <presentation> is one of the following:

  • window: A fullscreen window.
  • page: A window using the full height, but not the full width of the screen.
  • form: A window small enough to always leave room for the keyboard on iPad.

<subschema> refers to the URL of the site you are opening.

Example: openwindow-http://www.nytimes.com/

This would open the URL www.nytimes.com in a fullscreen window.

Note: As of June 3, 2014, Banner links in iOS prefixed with "openwindow-http://" will open in the in-app browser and not Safari.
Have more questions? Submit a request

0 Comments

Article is closed for comments.
Powered by Zendesk