Category: Conditional tags

Textpattern documentation within the category ‘Conditional Tags’:

  1. Textpattern conditional tags

    Container tag in Textpattern are great for making lists and you use conditional tags to get there.

    Go to the full documentation…

  2. Else

    The else tag is used within a containing conditional tag when the condition in the surrounding tag is not met.

    Go to the full documentation…

  3. If article author

    The if_article_author tag will execute the contained statement if the author name associated with a particular article matches.

    Go to the full documentation…

  4. If article category

    The if_article_category tag will execute the contained statement if the category name associated with a particular article matches.

    Go to the full documentation…

  5. If article id

    The if_article_id tag will execute the contained statement if the article id associated with a particular article matches.

    Go to the full documentation…

  6. If article image

    The if_article_image tag will execute the contained statements if an image is associated with the article being displayed.

    Go to the full documentation…

  7. If article list

    The if_article_list tag will execute the contained statement if an article list is being displayed.

    Go to the full documentation…

  8. If article section

    The if_article_section tag will execute the contained statements if the section name associated with a particular article matches.

    Go to the full documentation…

  9. If author

    The if_author tag will execute the contained statement if the called page is the result of an article search by a specific author's name.

    Go to the full documentation…

  10. If category

    The if_category tag will execute the contained statements if the 'name' attribute matches a category search value, or the list is an article list by category.

    Go to the full documentation…

  11. If comments

    The if_comments tag will execute the contained statements if there are comments associated with a particular article.

    Go to the full documentation…

  12. If comments allowed

    The if_comments_allowed tag will test the article identified by the attribute for status and act, or not, according to that status.

    Go to the full documentation…

  13. If disallowed

    The if_comments_disallowed tag will execute the contained statements if comments are disallowed for a given article.

    Go to the full documentation…

  14. If comments error

    The if_comments_error tag will execute the contained statements when an error exists with the comments.

    Go to the full documentation…

  15. If comments preview

    The if_comments_preview tag will execute the contained statements if a comment is being previewed.

    Go to the full documentation…

  16. If custom field

    The if_custom_field tag will execute the contained statements if custom fields for a given article have content.

    Go to the full documentation…

  17. If description

    The if_description tag will execute the contained statement if the current article/section/category's 'Description' field has an entry.

    Go to the full documentation…

  18. If different

    The if_different tag will execute the contained statement when the value of the contained statement differs from the preceding value.

    Go to the full documentation…

  19. If excerpt

    The if_excerpt tag will execute the contained statements if an excerpt is associated with the article being displayed.

    Go to the full documentation…

  20. If expired

    The if_expired tag will execute the contained statements, if a particular article is expired.

    Go to the full documentation…

  21. If expires

    The if_expires tag will execute the contained statements, if a particular article has an expiry date set.

    Go to the full documentation…

  22. If first article

    The if_first_article tag will execute the contained statements if the displayed article is the first in the list.

    Go to the full documentation…

  23. If first category

    The if_first_category tag will execute the contained statements if the current category is the first in the list.

    Go to the full documentation…

  24. If first file

    The if_first_file tag will execute the contained statements if the displayed file is the first in the currently displayed file download list.

    Go to the full documentation…

  25. If first image

    The if_first_image tag will execute the contained statements if the displayed image is the first in the currently displayed images list.

    Go to the full documentation…

  26. If first link

    The if_first_link tag will execute the contained statements if the displayed link is the first in the currently displayed link list.

    Go to the full documentation…

  27. If first section

    The if_first_section tag will execute the contained statements if the current section is the first in the list.

    Go to the full documentation…

  28. If last category

    The if_last_category tag will execute the contained statements if the current category is the last in the list.

    Go to the full documentation…

  29. If last file

    The if_last_file tag will execute the contained statements if the displayed file is the last in the currently displayed file download list.

    Go to the full documentation…

  30. If last image

    The if_last_image tag will execute the contained statements if the displayed image is the last in the currently displayed images list.

    Go to the full documentation…

  31. If last link

    The if_last_link tag will execute the contained statements if the displayed link is the last in the currently displayed link list.

    Go to the full documentation…

  32. If last section

    The if_last_section tag will execute the contained statements if the current section is the last in the list.

    Go to the full documentation…

  33. If plugin

    The if_plugin tag will execute the contained statements if the name attribute matches a currently installed plugin.

    Go to the full documentation…

  34. If search

    The if_search tag will execute the contained statements if the called page is the result of a search.

    Go to the full documentation…

  35. If search results

    The if_search_results tag will execute the contained statements if the current article list contains a certain amount of entries matching a search.

    Go to the full documentation…

  36. If section

    The if_section tag will execute the contained statements if the called page is part of the section specified.

    Go to the full documentation…

  37. If status

    The if_status tag will execute the contained statements depending on the requested page's HTTP status condition.

    Go to the full documentation…

  38. If thumbnail

    The if_thumbnail tag will execute the contained statements if the current image has a thumbnail assigned to it.

    Go to the full documentation…

  39. If variable

    The if_variable tag tests the existence and/or value of a global variable set with the variable tag.

    Go to the full documentation…

  40. If yield

    The if_yield tag tests the existence and/or value of a content set with the yield tag inside of an output_form container tag.

    Go to the full documentation…

See something wrong in this document? Outdated info, a broken link, faulty code example, or whatever? Please write an issue and we’ll fix it.