The Model Builder subcomponent is used by Table of Contents API 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 API Methods Include Page |
---|
| _methods intro |
---|
| _methods intro |
---|
|
modelLevelFn Div |
---|
| 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 |
---|
| Description | Used by the Model Builder to convert a flat list of headings into a hierarchical list using modelLevelFn. |
---|
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
|
---|
|
SubcomponentsSubcomponents can be configured though the parent component's components option using the following pattern: Code Block |
---|
| parent.component.name(".myContainer", {
components: {
<subcomponentName>: {
options: {
<subcomponent options>
}
}
}
});
|
headingCalculator |