{# /** * OTS Signs — Layout Designer Page * * Overrides the Xibo core layout-designer-page.twig to add two tailored * editor experiences alongside the standard full-page mode. * * Usage: * Normal: /layout/designer/{layoutId} * Deep-link: /layout/designer/{layoutId}?deeplink=1[&returnUrl=/app/layouts/123] * Embed: /layout/designer/{layoutId}?embed=1 * * Deep-link mode (?deeplink=1): * - Designed for direct navigation from an external React app. * - All Xibo chrome is stripped (sidebar, topbar, help pane, back buttons). * - A minimal OTS branded back bar is rendered at the top of the viewport. * - Clicking "Back" navigates to ?returnUrl= (relative paths only) or * falls back to window.history.back() if the param is absent/invalid. * - The editor options dropdown (Publish, Checkout, Discard…) stays visible. * * Embed mode (?embed=1): * - All CMS navigation is hidden (sidebar, topbar, help pane). * - Back/Exit buttons in the editor toolbar are hidden. * - postMessage events are sent to the parent window: * xibo:editor:ready, xibo:editor:save, xibo:editor:publish, xibo:editor:exit * - Parent can send: xibo:editor:requestSave * * Copyright (C) 2020-2026 Xibo Signage Ltd * Copyright (C) 2026 Oribi Technology Services * * Licensed under the GNU Affero General Public License v3.0 */ #} {% extends "authed.twig" %} {% import "inline.twig" as inline %} {% block title %}{{ "Layout Editor"|trans }} | {% endblock %} {% set hideNavigation = "1" %} {% set forceHide = true %} {% block headContent %} {{ parent() }} {# Early mode detection — prevents FOUC for both embed and deep-link modes #} {% endblock %} {% block pageContent %} {# Deep-link mode: branded back bar (position:fixed — shown only when ots-deeplink-mode is active) #}
{# Skeleton loading screen — replaced by editor once editor-opened class fires on body #} {% endblock %} {% block javaScript %} {# Add common files #} {% include "editorTranslations.twig" %} {% include "editorVars.twig" %} {# ── Skeleton dismiss + keyboard shortcut hints ──────────── #} {# ── Embed mode: postMessage bridge ──────────────────────── #} {# ── Deep-link mode: returnUrl back navigation ────────────── #} {% endblock %}