Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migration of unmigrated content due to installation of a new plugin
{div:class=} {anchor:top} The Model Builder subcomponent is used by [Table of Contents] to convert a flat list of headings into a hierarchical list suitable for the Table of Contents. *Do not use this component directly.* The information on this page should be use when customizing Table of Contents. *See Also* [Table of Contents] [UI Enhancer] {div2:class=summary-table} ||Supported Events |_none_| ||[#Methods]| {{[#modelLevelFn]}}\\ Used to determine how to nest heading.\\ \\ {{[#toModel]}}\\ Use to actually build the nested model. | ||Options |_none_| {div2} h2. Methods {span:class=back-to-top}[back to top|#top]{span} {include:_methods intro} h3. modelLevelFn {div2:class=api-table} ||Description|Used by the {{[#toModel]}} method to decide how deeply to nest a heading in the Table of Contents. The default implementation creates a nested hierarchy that uses incremental depths, independent of the actual heading levels.| ||Parameters| _modelLevel_\\ An array used to keep track of actual hierarchy levels, when those are being preserved.\\ \\ _subHeadings_\\ An array used to keep track of adjusted, gradual headings, when gradual nesting is used. | ||Configurable|_yes_\\ Default implementation: {{fluid.tableOfContents.modelBuilder.gradualModelLevelFn}}| ||Notes| The Model Builder also defines an alternative implementation: {{fluid.tableOfContents.modelBuilder.skippedModelLevelFn}}, which produces a hierarchy that exactly reflects heading levels.| {div2} h3. toModel {div2:class=api-table} ||Description|Used by the Model Builder to ...| ||Parameters| _headingInfo_\\ A flat array of objects describing all headings to be included in the table of contents\\ \\ _modelLevelFn_\\ The function to use to determine the nesting of the table of contents. | ||Configurable| _yes_\\ Default implementation: {{
Wiki Markup
Div
classcomponent-api-page

Anchor
top
top

The Model Builder subcomponent is used by Table of Contents to convert a flat list of headings into a hierarchical list suitable for the Table of Contents.

Do not use this component directly. The information on this page should be use when customizing Table of Contents.

See Also
Table of Contents
UI Enhancer

Div
classsummary-table

Supported Events

none

#Methods

#modelLevelFn
Used to determine how to nest heading.

#toModel
Use to actually build the nested model.

Options

none

Methods

Span
classback-to-top
back to top

Include Page
_methods intro
_methods intro

modelLevelFn

Div
classapi-table

Description

Used by the #toModel method to decide how deeply to nest a heading in the Table of Contents. The default implementation creates a nested hierarchy that uses incremental depths, independent of the actual heading levels.

Parameters

modelLevel
An array used to keep track of actual hierarchy levels, when those are being preserved.

subHeadings
An array used to keep track of adjusted, gradual headings, when gradual nesting is used.

Configurable

yes
Default implementation: fluid.tableOfContents.modelBuilder.gradualModelLevelFn

Notes

The Model Builder also defines an alternative implementation: fluid.tableOfContents.modelBuilder.skippedModelLevelFn, which produces a hierarchy that exactly reflects heading levels.

toModel

Div
classapi-table

Description

Used by the Model Builder to ...

Parameters

headingInfo
A flat array of objects describing all headings to be included in the table of contents

modelLevelFn
The function to use to determine the nesting of the table of contents.

Configurable

yes
Default implementation: "fluid.tableOfContents.modelBuilder.toModel"

}}.| ||See also| {{[#modelLevelFn]}}| {div2} {div}

.

See also

#modelLevelFn