Adobe InDesign CS6 (8.0) Object Model JS: Section

InDesign CS6

Class

Section

 A section.

QuickLinks

addEventListener, extractLabel, getElements, insertLabel, remove, removeEventListener, toSource, toSpecifier

Hierarchy

Document
Section
Event | EventListener | MutationEvent

Properties

PropertyTypeAccessDescription
alternateLayoutstring r/wThe alternate layout name for a set of pages.
alternateLayoutLengthnumber readonlyThe number of pages in the alternate layout section.
continueNumberingbool r/wIf true, continues page numbers sequentially from the previous section.
eventListenersEventListeners readonlyA collection of event listeners.
eventsEvents readonlyA collection of events.
idnumber readonlyThe unique ID of the Section.
includeSectionPrefixbool r/wIf true, places the specified prefix before page numbers on all pages in the section.
indexnumber readonlyThe index of the Section within its containing object.
isValidbool readonlyReturns true if the object specifier resolves to valid objects.
labelstring r/wA property that can be set to any string.
lengthnumber readonlyThe number of pages in the section.
markerstring r/wThe section marker.
namestring r/wThe name of the Section.
pageNumberStartnumber (range: 1 - 999999) r/wThe page number assigned to the first page in the section. Note: Valid only when continue numbering is false.
pageNumberStylePageNumberStyleString r/wThe page number style. Can return: PageNumberStyle enumerator or String.
pageStartPage r/wThe start page for the section.
paginationPaginationOption:
PaginationOption.AUTO_PAGINATE
PaginationOption.FROM_LAST_PAGE
r/wThe pagination option for this section for adding and removing pages in HTML5.
paginationMasterMasterSpread
NothingEnum
r/wThe master to apply when pages are added in HTML5. Can also accept: NothingEnum enumerator.
parentDocument readonlyThe parent of the Section (a Document).
propertiesObject r/wA property that allows setting of several properties at the same time.
sectionPrefixstring r/wThe prefix to place before page numbers on pages in the section. May include up to 8 characters. Note: Valid only when include section prefix is true.

Methods

Instances

EventListener addEventListener (eventType: string, handler: varies[, captures: bool=false])
Adds an event listener.

ParameterTypeDescription
eventTypestringThe event type.
handlerFile
JavaScript Function
The event handler. Can accept: File or JavaScript Function.
capturesboolThis parameter is obsolete. (Optional) (default: false)

string extractLabel (key: string)
Gets the label value associated with the specified key.

ParameterTypeDescription
keystringThe key.

Array of Section getElements ()
Resolves the object specifier, creating an array of object references.

void insertLabel (key: string, value: string)
Sets the label to the value associated with the specified key.

ParameterTypeDescription
keystringThe key.
valuestringThe value.

void remove ()
Deletes the Section.

bool removeEventListener (eventType: string, handler: varies[, captures: bool=false])
Removes the event listener.

ParameterTypeDescription
eventTypestringThe registered event type.
handlerFile
JavaScript Function
The registered event handler. Can accept: File or JavaScript Function.
capturesboolThis parameter is obsolete. (Optional) (default: false)

string toSource ()
Generates a string which, if executed, will return the Section.

string toSpecifier ()
Retrieves the object specifier.

Element of

Page.appliedAlternateLayout

Page.appliedSection

Used in:

Section Sections.nextItem (obj: Section)

Section Sections.previousItem (obj: Section)

Return

Array of Section Section.getElements ()

Section Sections.[] (index: number)

Section Sections.add ([reference: Page][, withProperties: Object])

Section Sections.anyItem ()

Array of Section Sections.everyItem ()

Section Sections.firstItem ()

Section Sections.item (index: varies)

Section Sections.itemByID (id: number)

Section Sections.itemByName (name: string)

Array of Section Sections.itemByRange (from: varies, to: varies)

Section Sections.lastItem ()

Section Sections.middleItem ()

Section Sections.nextItem (obj: Section)

Section Sections.previousItem (obj: Section)

Jongware, 28-Apr-2012 v3.0.3hContents :: Index