Textpattern CMS Template Tags

<txp:output_form /> sing/cont tag, 1 attributes


The output_form tag can be used as a single or a container tag. Textpattern will replace this tag with the content resulting from the form called by the tag.

For the container tag usage, see the yield tag.


  • Use specified form.


Version 4.2.0

  • Can be used as a container tag.
<txp:output_form /> 3 examples

Display static text at the head of a column

<txp:output_form form="headtext" />

Manage header for all pages

Suppose you want to manage the DOCTYPE and the <head> section of your page template as a single-sourced block of content. You can create a form called page-header and save it as type misc. The content of the form might look like this (just one example):

<tt><?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="fr" lang="fr">
<title><txp:page_title /></title>
<txp:css />

Then in each of your pages, you insert the header using…

<txp:output_form form="haut_page" /> 

…which will add the header to all the pages automatically.

The advantage of this is that when you edit your page header, you can do so once in the form and it will update all instances of use in your different pages at the same time.

Manage small pieces of static text

You can use this tag in combination with a form to create small pieces of text that would not otherwise be managed as a regular article. For example you might define the copyright conditions of content on your site in a form and add that to one or more places via the output_form tag. Name the form copyright, save it as type misc and call the form using the tag structure…

<txp:output_form form="copyright" />