İçeriğe geç
HOC Site Docs
Esc
↑↓gezin↵aç⌘Jönizle
Bu sayfada

Sayaç ve sayfa kuralları

Sayısal sayaç değişkenleri, değişken görünürlüğü ve oturum, rol, değişken güncelleme, veri isteği veya yönlendirme yapan sayfa kuralları.

Aşağıdaki alan düzeyi katalog tabloları İngilizce kalır — düzenleyici, API ve MCP’nin kullandığı makine tasarım şemasıyla birebir uyumludur.

Pages and page components store a numeric ticker variable and structured page rules on root.props. Chrome and email documents do not.

Ticker variable

Add a document variable with type: "ticker". The stored value is a number. Settings live on ticker: mode (manual or automatic), min, max, and start. Automatic tickers also set intervalMs (at least 100) and step (default 1). Passing max wraps to min, and passing min wraps to max. Set, add, and subtract clamp into min/max. Clear returns to start. A manual ticker changes only when a button or a page rule updates it. An automatic ticker advances on its interval on the public page and in interactive preview, and stays still while the canvas is in edit mode. Use a manual ticker as a step index: next and back buttons add or subtract 1, and each step is a normal block whose visibility compares the ticker. Use an automatic ticker as a cycling index: bind a heading or rich text to it, or show one block per value.

Variable visibility

shell.visibility.variableVisibility hides a block unless the named variable matches. { "variableId": "<id>", "op": "eq", "value": "2" }. op is eq, neq, gt, lt, gte, or lte. Both sides are compared as numbers when they parse as numbers. An empty variableId leaves the block visible. Visibility checks are skipped while editing, so every step stays visible on the canvas.

Page rules

Rules live at root.props.rules and are edited in the Rules plugin. Each rule has id, name, enabled, when, conditions (every condition must match), and actions (run in order). when is { "type": "pageLoad" } or { "type": "variableChange", "variableId": "<id>" }. Conditions:

  • { "type": "auth", "expect": "signedIn" } or "signedOut"
  • { "type": "role", "roleLabel": "Reception" } (case-sensitive label; the visitor must be signed in)
  • { "type": "variable", "variableId": "<id>", "op": "eq", "value": "1" } Actions:
  • { "type": "updateVariables", "variableUpdates": [{ "variableId": "<id>", "op": "add", "value": "1" }] } — same ops as a button, including ticker set, add, subtract, and clear
  • { "type": "runRequest", "requestName": "search" }
  • { "type": "redirect", "path": "/account" } — internal path only (/ and not //) Page-load rules run once. Variable-change rules run when that value changes, and a rule does not immediately retrigger itself. Redirects do not run while the canvas is in edit mode. A signed-in role redirect is a page-load rule: if signed in and the role label matches, redirect to that path, plus a fallback rule for everyone else.

Bu sayfa yardımcı oldu mu?