Go to main content

Body

Contents

Syntax

<txp:body />

The body tag is a single tag which is used to return the text, or content, of the article being displayed (the article itself). The tag can be used in Textpattern ‘article’ type Form templates, or within Page templates, either wrapped within a given article tag, or directly in the template itself so long as the context is with a single article (as opposed to an article list).

Attributes

This tag has no attributes of its own. It accepts only the global attributes .

Examples

Example 1: Display the article text

<h1>
    <txp:title />
</h1>
<p>
    <txp:author /> at <txp:posted />
</p>
<txp:body />

When used as part of your article form, this displays the article title, author and posted date, then the body text beneath that.

Other tags used: author, posted, title.

If you notice any kind of problem with this page’s construction or content (outdated information, typos, broken links, or whatever), open an issue to have it sorted. Or have a go at it yourself. :)