Skip to main content
Inspiring
October 12, 2016
Question

How do I use JavaScript to find a slide number using slide label?

  • October 12, 2016
  • 1 reply
  • 1345 views

Hello,

In short, I would like to loop through the slides on a user interaction, find the slide with a particular label/title, get its corresponding slide number, and jump to that particular slide number.

I know how to find the correct slide object on the cp.model.data object, but this slide object doesn't seem to have the slide number on it.

Any help will be appreciated!

    This topic has been closed for replies.

    1 reply

    Lilybiri
    Legend
    October 12, 2016

    Does it have to be by JS? With an action you can jump to a slide using its label or its number.

    Inspiring
    October 12, 2016

    Really? Didnt know this... i knew you could use a number. Ill have to look

    at this later...

    Lilybiri
    Legend
    October 12, 2016

    I am a labeling freak and always label slides and most objects. I never use a slide number in any action. At the same time you already have labels that will be used in the TOC, which I'll use in most projects and prefer over a playbar for navigation reasons.

    Although I appreciate JS in some circumstances (like using an array, formatting a number, having a random number) there is quite a lot that can be done with advanced or shared actions that is much easier, at least if you are not a great programmer like TLCMediaDesign