Loading
Table of Contents
Select Filters

          No results
          No results
          Here are some search tips

          Check the spelling of your keywords.
          Use more general search terms.
          Select fewer filters to broaden your search.

          Search all of Salesforce Help
          goToSlide Function

          goToSlide Function

          Goes to the specified pages and assets within a presentation.

          Required Editions

          Available in: Lightning Experience
          Available in: Enterprise and Unlimited Editions with Life Sciences Cloud, Life Sciences Cloud for Customer Engagement Add-on license, and the Life Sciences Customer Engagement managed package.

          To make sure that this function opens the correct page or asset, use unique names or IDs for pages and assets within the presentation.

          Syntax

          PresentationPlayer.gotoSlide([PageId|PageName|SourceSystemIdentifier], slideName, animation)

          Arguments

          Argument Description
          PageId

          The ID of a page in the presentation. If left blank, the current page is used. You can use the PageId argument only to navigate to presentation pages. Use this format.

          PresentationPage.Id
          PageName

          The name of a presentation page or asset. Use this format.

          PresentationPage.Name
          SourceSystemIdentifier

          An optional external ID for the presentation content, typically provided when users upload presentations via the content API. Use this format.

          PresentationPage.SourceSystemIdentifier
          slideName The name of the slide.
          animation

          The animation to use to open the slide. These values are supported.

          • noanimation | undefined | null: Opens the slide immediately with no animation.
          • swipeleft: Opens the slide with a left swipe.
          • swiperight: Opens the slide with a right swipe.

          Swipe animations can affect performance in the presentation player.

          Usage

          To reference another page in a presentation, first retrieve its page ID from the JSON.

          Before you use the goToSlide function, include this code at the top of the HTML or other JavaScript code. The first line of code references the entire JSON file, while the second row gets the page ID, which is stored in a zero-based array.

          var configData;
              document.addEventListener('PresentationDOMContentLoaded', (event) => { 
                 configData = event.data; 
                 var PageId = 
              configData.presentations[configData.presentationIndex].Pages[1].id;
              });

          Or, you can use this code.

          var configData = {{{.}}};
              
               var PageId = configData.presentations[confgData.presentationIndex].Pages[3].id;

          Then, use the goToSlide function with that ID. For example, this code is attached to an HTML button on the presentation page.

          <button onclick="PresentationPlayer.gotoSlide(PageId, '01_slide.html',null)" 
              class="class" type="button">Next</button>
           
          Loading
          Salesforce Help | Article