§5.9
Revisions: notice placement, slider appearance, contact, conversations
- Phase 10.8c
- theme 1.10.0
Site notices under the breadcrumbs (engine rule). Success / error / warning notices and the validation error summary now sit in the same place in every theme, right under the breadcrumbs and before the content. For this the theme puts the new output point @hook('SiteAfterBreadcrumbs') at the end of the page title partial (for example includes/pagehead.wcp). The engine prints notices once per page: at that point if it exists, otherwise (older themes) at the start of the content on public pages. On a page where the point is used, $flash arrives empty; the theme must not print notices in the header as well (the default theme removed the includes.flash call from header.wcp). If there is a validation error and no separate error notice, the engine adds a single "Please correct the marked fields" warning; field errors under the inputs stay as they are, so do not write a second general warning on the page.
Slider appearance. slides('home') adds appearance to every slide: position (left | center | right), backdrop (soft | panel | none), blur and strength (0–100). The value is the slide's own setting, otherwise the location's setting (Interface › Slider › Appearance). Values arrive forced into the allowed set; the theme prints them as data-* attributes and CSS variables:
<div class="wi-slide" data-pos="{{ $s['appearance']['position'] }}" data-shade="{{ $s['appearance']['backdrop'] }}"
style="--slide-blur: {{ $s['appearance']['blur'] }}; --slide-shade: {{ $s['appearance']['strength'] }}">
On mobile, centre the text and apply at least 40% shading for readability (max(.4, …)). slider_options() gives the same four values at location level as well (text_position, text_backdrop, image_blur, overlay_strength).
Component declaration. A theme that draws the slider, references and client reviews sections declares this in the manifest; otherwise the admin panel shows "the active theme does not show this component":
'supports' => ['slider', 'references', 'testimonials'],
Docking the domain search onto the slider. $section['docked'] (on every section, default false): when the domain search section comes right after the slider, the administrator chose "Layout: Dock onto the slider" (default; $section['options']['layout'] = dock | band), and there are published slides and TLDs on sale, both the slider and the search section get docked = true. The theme gives the slider extra bottom space and the search section a card that overlaps the slider; otherwise the band appearance stays.
Contact page. $company['offices'] was added: name, city, address, phone, tel (a ready tel: address or null), email (empty when invalid), hours, map_url (http(s) only, otherwise null), main. The captcha component (site_component('captcha', ['form' => 'contact'])) returns content only when enabled and its output contains no whitespace; if you leave the container empty you can hide it with :empty. The built-in captcha uses classes instead of inline styles (.wi-cap, .wi-cap__label, .wi-cap__img, .wi-cap__refresh — an icon button whose accessible name is "New code" —, .wi-cap__input); your theme can style it with these classes.
Ticket conversation and WEditor. A message whose $messages[*]['side'] is client belongs to the viewing client; the default theme shows these on the right and highlighted, and the support team's on the left (wi-msg--mine). body_html can now be formatted: messages written with WEditor arrive as <div class="we-content">…</div>, sanitised with an allow-list (headings, lists, tables, code blocks, links, images attached to the message, palette classes we-c-1…8, we-bg-1…6). The base styling is in the core's assets/css/weditor.css and is added to the page with the reply form block; your theme can give its own typography under .we-content. Old plain text messages arrive as before (with <br>).
Footer signature. The "Powered by WIACP" link is placed right before the last <footer> element and appears as a plain line above the theme's footer. The rule that the theme must not try to hide or move this element is unchanged (§14).