§5.1
Pages and their data
- Phase 10.1
The data of these pages is prepared in the core and the same array goes both to the theme and (when the theme does not provide the page) to the core view. The data contains no models or other objects; publishing state, language, visibility and price rules are applied before data is built. Templates do not repeat these rules.
| File | Page | Main variables |
|---|---|---|
page.wcp |
content page at the root | $item |
blog.wcp, announcements.wcp |
blog / announcement list | $items, $pagination, $category, $categories (blog), $index_url |
blogpost.wcp, announcement.wcp |
post / announcement | $item, $index_url, $categories (blog) |
knowledgebase.wcp |
knowledge base home and search | $categories, $popular, $search (query, action, results → items, pagination) |
knowledgebase-category.wcp |
knowledge base category | $category, $items, $pagination, $categories, $search |
knowledgebase-article.wcp |
article | $item, $categories, $search, $feedback (action, csrf, voted, thanks, duplicate) |
products.wcp |
area and category showcase | $mode (area / category), $area, $categories or $category + $products, $tax_note, $order |
productdetails.wcp |
product | $area, $category, $product (prices, features, description_html, available), $order |
domainchecker.wcp |
domain search | $query, $action, $results (domain, status, status_label, available, premium, price), $tlds, $throttled, $order |
contact.wcp |
contact | $action, $company, $agreement (consent_html), $phone_codes, $csrf |
agreements.wcp, agreement.wcp |
agreements | $agreements; $agreement (version, effective_at, lang_name, body_html, versions) |
Content cards and details share these fields: title, summary, url, date_label, cover, category, author, lang, lang_name, fallback, members_only; details also carry body_html, updated_label, alternates. When fallback is true, the content is shown in the default language because it is missing in the selected one; the theme should show this as a note and put lang="{{ $item['lang'] }}" on the content container.
Order buttons: an inactive button is drawn as <button type="button" disabled aria-disabled="true">; href="#" is not used.
SEO and structured data: the page's <head> content ($page['head']) is produced in the core; the theme writes no title, canonical, hreflang or JSON-LD. Per-language slugs, canonicals of paginated lists and structured data (organisation, location, article, product price) are added to this head automatically (0.2.0-alpha.70).
Forms: the contact form and knowledge base vote post to core routes; the theme uses action and csrf as given and does not rename fields. Validation, captcha and rate limits are on the server.