# Structure API

The e-Detailer structure is defined in the structure.json file. You can access these settings using the structure API methods on any slide or component in your e-Detailer project.

The structure API exposes its methods with the this.$structure context of a slide/component instance. The slide instance is in the ./slides directory. For example, the index.vue file. The component instance is in the ./node_modules/[wiz-component-name]/index.vue file.

The structure API retrieves standard and custom fields for both structure.json versions 1 and 2. The custom fields are shown in the custom object. For example, the response of the getSlides method:

custom field response example

# getRaw

Use the getRaw method to access the e-Detailer structure in the raw format.

this.$structure.getRaw()

For usage examples, see getRaw.

# getSlides

Use the getSlides method to get an array of nested slide data: the chapter it belongs to, the subslides it has, whether it's visible, hidden, or archived.

this.$structure.getSlides()

For usage examples, see getSlides.

# getFlatSlides

Use the getFlatSlides method to get an array of flat slide data: the chapter it belongs to, the subslides it has, whether it's visible, hidden, or archived.

this.$structure.getFlatSlides()

For usage examples, see getFlatSlides.

# getVisibleSlides

Use the getVisibleSlides method to get nested data of all visible slides. The method doesn't retrieve hidden and archived slides.

this.$structure.getVisibleSlides()

For usage examples, see getVisibleSlides.

# getFlatVisibleSlides

Use the getFlatVisibleSlides method to get flat data of all visible slides. The method doesn't retrieve hidden and archived slides.

this.$structure.getFlatVisibleSlides()

For usage examples, see getFlatVisibleSlides.

# getHiddenSlides

Use the getHiddenSlides method to get nested data of all hidden slides. The method doesn't retrieve visible and archived slides.

this.$structure.getHiddenSlides()

For usage examples, see getHiddenSlides.

# getFlatHiddenSlides

Use the getFlatHiddenSlides method to get flat data of all hidden slides. The method doesn't retrieve visible and archived slides.

this.$structure.getFlatHiddenSlides()

For usage examples, see getFlatHiddenSlides.

# getArchivedSlides

Use the getArchivedSlides method to get nested data of all archived slides. The method doesn't retrieve visible and hidden slides.

this.$structure.getArchivedSlides()

For usage examples, see getArchivedSlides.

# getSlide

Use the getSlide method to get nested data of a specific slide. The method retrieves visible, hidden, and archived slides.

this.$structure.getSlide('[SLIDE_ID]')

[SLIDE_ID] is the ID of a specific slide.

For usage examples, see getSlide.

# getFlatSlide

Use the getFlatSlide method to get flat data of a specific slide. The method retrieves visible, hidden, and archived slides.

this.$structure.getFlatSlide('[SLIDE_ID]')

[SLIDE_ID] is the ID of a specific slide.

For usage examples, see getFlatSlide.

# getChapters

Use the getChapters method to get nested data of all chapters in the structure.json file. The method retrieves visible, hidden, and archived chapters.

this.$structure.getChapters()

For usage examples, see getChapters.

# getHiddenChapters

Use the getHiddenChapters method to get nested data of all hidden chapters in the structure.json file. The method doesn't retrieve visible and archived chapters.

this.$structure.getHiddenChapters()

For usage examples, see getHiddenChapters.

# getVisibleChapters

Use the getVisibleChapters method to get nested data of all visible chapters in the structure.json file. The method doesn't retrieve hidden and archived chapters.

this.$structure.getVisibleChapters()

For usage examples, see getVisibleChapters.

# getChapter

Use the getChapter method to get data about a specific chapter in the structure.json file. The method retrieves visible, hidden, and archived chapters.

this.$structure.getChapter('[CHAPTER_ID]')

[CHAPTER_ID] is the ID of a specific chapter.

For usage examples, see getChapter.

# getChapterSlides

Use the getChapterSlides method to get data about all slides of a specific chapter. The method retrieves visible, hidden, and archived slides.

this.$structure.getChapterSlides('[CHAPTER_ID]')

[CHAPTER_ID] is the ID of a specific chapter.

For usage examples, see getChapterSlides.

# getSlideSubslides

Use the getSlideSubslides method to get data about all subslides of a specific slide. The method retrieves visible, hidden, and archived subslides.

this.$structure.getSlideSubslides('[SLIDE_ID]')

[SLIDE_ID] is the ID of a specific slide.

For usage examples, see getSlideSubslides.

# getStartSlide

Use the getStartSlide method to get the data of the starting slide. The method retrieves the slide from the start object of the structure.json file. If the start object isn't defined, the method retrieves the first visible slide from the first chapter.

this.$structure.getStartSlide()

For usage examples, see getStartSlide.

# getStoryboard

Use the getStoryboard method to get data about all the chapters and their slides that belong to the storyboard.

this.$structure.getStoryboard()

For usage examples, see getStoryboard.

# getStructureFileVersion

Use the getStructureFileVersion method to get the data about the structure.json file version.

this.$structure.getStructureFileVersion()

For usage examples, see getStructureFileVersion.

Last updated: 12/13/2022, 1:21:31 PM