# setContent

The `setContent` method sets the content (the value of the `DRECONTENT` field) for a document or document section.

## Syntax

    setContent( content [, number] )

## Arguments

Argument | Description
--- | ---
`content` | (string) The content to set for the document or document section.
`number` | (number) The document section to modify. If you do not specify a number, the method modifies the active section. For the document object passed to the script's `handler` function, the active section is the first section (section 0). If you specify a number greater than the number of existing sections, additional empty sections are created.

## Examples

    -- Set content for section 0
    document:setContent("content0")

    -- Get document for section 1
    local section = document:getNextSection()

    -- Set content for section 1
    section:setContent("content1")

    -- Set content for section 7, and assign sections 2-6 to
    -- empty string if non-existent
    document:setContent("content7", 7)

_FT_HTML5_bannerTitle.htm