URLs for Stories

URLs for Stories

This guide shows you how to handle URL parameters in your website and shows a story.

📘

Before you begin

This walkthrough contains URL parameters format. You can get URL parameters from Storyly Dashboard -> Content.

The URL parameters format;

?storyly=[storyGroupId]
or
?storyly=[storyGroupId, storyId]
or
?storyly=[storyGroupId, storyId, "PlayMode"]

The Storyly Dashboard generates URL Parameters automatically for each story when a story is created. The website needs to add these parameters to website URLs to open the related story.

Programmatically

You can also use the following method to open the related story programmatically.

storylyWeb.openStory({
  group: storyGroupId,
  story: storyId,
  playMode: "PlayMode", 
});

Play Modes

Playing to the End

This mode is the default play mode. If the PlayMode parameter is not defined, Storyly opens the Story Group and a specific Story (if storyId is provided) and all active Story Groups will be shown to the user.

Playing a Single Story Group

This mode plays only the specific Story Group. If the PlayMode parameter is defined as “sg”, Storyly opens the Story Group and a specific Story (if storyId is provided) and shows only that Story Group whose storyGroupId is used in the URL.

Playing a Single Story

This mode plays only the specific Story. If the PlayMode parameter is defined as “s”, Storyly opens the Story Group and the specific Story (storyId is required) and shows only that Story whose storyId is used in the URL.

🚧

Warning

Please make sure that PlayMode parameter is used within quotation marks.