Incorrect tag contexts
Certain Textpattern tags are only intended for use in particular places. If you see a message similar to this…
“Article tags cannot be used outside an article context.”
…then Textpattern is telling you that you shouldn’t use the named tag where you have placed it.
‘Article’ form tags only work in an article context. They refer to one single article, so they can only be used in a context that identifies one particular article. Specifically, they may be used:
- On individual article Page templates.
- In ‘article’ type Form templates that have been displayed using a
<txp:article ... />or
<txp:article_custom ... />tag.
- On list Page templates if the tags are wrapped in
Article context tags will not work directly in article list Page templates, because list pages are not associated with any single article.
Similarly, ‘Comment’ form tags may only be used in the form that is used to display each individual comment (usually named
comments); ‘File’ form and ‘Link’ form tags operate likewise.
The following contexts are recognised by Textpattern:
|Article||Any individual article.|
|Author||Any URL of the type
|Category||Any URL of the type
|Category asset||Any URL of the type:
|Comment||Comments areas within an article.|
|Image||Any individual image when using an
|File||Any individual file when using an
|Link||Any individual link when using an
|Section||Any individual section when using a