Texpattern context demo

Current global context
SectionArticle
context_demo149

Local image context: Article image

There’s yet a third mechanism for creating image context: the article image. Adding an image ID to an article’s “article image” field allows you to display that image, by putting an article_image tag into the article form:

<txp:article_image thumbnail="1" />

(Note that image and thumbnail do not pick up article-image context in this way; see the example below for how to use them to display article images.)

You can also use images to get at the article image. Where article_image only returns a single image, images allows you to store a list of images in the article image field. This article actually has several images assigned to it:

This code:

<txp:images break="">
	<txp:thumbnail link="1" />
</txp:images>

produces this output: