Forum Discussion
Jump to location in published file using url string parameters?
Thank you for your input Gary. This looks like it might come in handy as we develop. I already have a library of a thousand or so published projects and was hoping to find a way to do this with already published content. I understand it might be possible but I thought I would shoot for the moon.
I was looking through the frame.xml file and there are preassigned slide numbers in each frame.xml... I wonder if we added the javascript to the first slide of each project if we could use the preassigned slideid variables as our anchors. I know other preassigned variables (such as quiz.scorepercent) cannot be pushed or pulled from a project without a javascript assignment. And those variables are visible in the project while the slideid isn't even a variable but more of an attribute.
Yes, spot on in your analysis. The frame.xml file in a published Storyline package does include internal identifiers like slideid, but here's the crux:
Slideid in frame.xml
slideid is used internally by the Storyline player to track slide transitions and metadata.
It's not exposed as a JavaScript-accessible variable nor does it map cleanly to a direct URL-accessible anchor point like HTML IDs or hash fragments (e.g., #slide1).
There is no public API from Articulate that lets you jump to a slideid directly via URL parameters.
JavaScript Triggers, yes, you're correct: just like quiz.scorepercent, these internal elements aren't accessible or writable unless explicitly surfaced using JavaScript inside the Storyline project. However:
You can read URL parameters with JavaScript.
Then use that parameter to trigger a jump to a specific slide if you've prepared for it in advance using a variable (like targetSlideId).
So if you correlate the known slideid values in frame.xml to internal slides manually, you can create a lookup system.
One possible Solution
If your creative coders can parse the slideid from frame.xml:
- Create a mapping of slideid → internal Storyline slide name or index.
- Pass the slideid as a URL parameter.
- Use JavaScript on the first slide to read that slideid, match it to your mapping, and jump to the corresponding slide.
Here is a sample mapping example in JavaScript:
const slideMap = {
'3f7398cc-f12b-43b6-bf94-1d759c5a172e': 'Intro',
'b0d084e3-23a2-40b3-9b97-bcc9c0e7b28f': 'Module1_Slide2',
};
var slideId = getQueryVariable("slideid");
if (slideId && slideMap[slideId]) {
var targetSlide = slideMap[slideId];
player.SetVar("targetSlide", targetSlide);
}
Then inside Storyline, use triggers that jump to specific slides based on targetSlide.
Related Content
- 12 months ago
- 10 months ago