List pages, detail pages and the search page
The closed set of six page templates, providing only a content-page template losing all list entries, and the two sources of misjudgment: pagination totals and the cache freshness window.
What a theme must provide is not "one page" but templates for several kinds of pages. This article covers what the kinds are, what happens when one kind is missing, and several inconspicuous but biting contracts on the list and search pages.
The page types are a closed set; the first release has six. Home page, ordinary content page, content detail page, search results page, content list page, and page not found. A theme can provide a dedicated template for a type; when a dedicated template is missing, it falls back to the official default template. Adding a page type is not adding a file — it must simultaneously deliver the data fields, URL rules, permission boundaries and fallback behavior, or it is better not to do it.
The most expensive one: the list page needs its own template. When only the content-page template is provided and the list template is missing, the list page falls back to the content-page template, and that template does not render list entries — the page opens, status 200, styles look normal, all entries lost. This is the most typical "looks successful" situation in theme development. Built-in themes all carry a list template, and the server also has a criterion asserting that entries really appear on the page; for your own theme, run addresses like /news, /en/news once on purpose and confirm the card count matches the backend entry count, instead of only looking at the home page.
"What language is this entry" must be shown honestly in list entries. Every entry delivered carries a fallback mark: when the title has no translation in that language, it remains source-language text, and the page must mark it (the server adds the mark; the theme just has to not override it). Sorting by title uses the source-language column — translated texts have no comparable order, and sorting by translation would make the content on page 2 depend on the visitor's language. The range that keywords hit equals the columns visitors see, so a foreign-language page with an English title can only be found by English search — that is not a bug, it is the same criterion.
Pagination and totals. List data carries the page number, page width and the total; the total is the real total, not the length of the current page. When rolling your own pagination, do not use "the number of entries on this page" as the total — that makes "next page" permanently unclickable when some page happens to be exactly full, and the historical entries beyond that page simply do not exist in the interface.
Three things on the detail page. First, the cover image: whether to switch to the smaller tier is answered by the server; the theme only consumes the result and must not filter "which images may have derived tiers" by address prefix itself. Second, custom fields: they are currently not per-language (they live in the entity row; the translation table has only the three columns title/body/summary), so custom fields on foreign-language detail pages are always in the source language — do not assume in the template that they follow the language. Third, dates: the display value delivered is a self-describing moment with its offset; the theme just renders it and should not convert timezones itself.
The search page. Public search is LIKE matching, not a full-text engine (that is an honest state, not a backlog item). It answers "visitors can find published content"; it does not promise relevance ordering; the results page also takes titles and summaries by language and also carries entry-level fallback marks.
Caching and "I changed it but do not see it". The cache key of rendered results contains at least the theme version, page version, language and site configuration version. So changing the theme version, editing body text, or changing the language list all produce new results; conversely, if you changed the body text in the browser but the page did not change, think of two things first: content edits take effect for visitors immediately, while site-level configuration (navigation, carousel announcements, theme version) needs one publish click; and public pages have a 60-second freshness window, during which a second request is answered by the browser — it is not that the server did not update.
Page not found. 404 is a template slot, not "draw nothing". It must still carry the navigation and the language switcher, otherwise visitors cannot get out from the error page. Home-page aliases (slugs like home/index historically) are normalized by one server-side criterion; the theme neither needs to nor should handle "are these two addresses the same page" itself.