Skip to main content
Version: v1 (Current)

Build a Portal Theme

A theme is the visual shell around the portal's page content. It controls layout and styling; the installed app still supplies the page. The hub supports legacy runtime templates and a compiled single-layout component. Choose the mode your theme version uses before authoring.

Create the theme​

  1. Open Developer Hub → Themes in the owning team and choose New theme.
  2. Provide a name, a unique lowercase hyphenated slug, descriptions and optional icon/color.
  3. Open the created theme. Its initial version is selected for authoring.
  4. In Settings, review General, Config Form, Assets and Additional Styling. The mode control selects legacy templates or the uploaded component workflow.

Theme creation asks for a slug, unlike the App dialog which derives it server-side. Keep a source copy of your templates, schema and compiled artifacts in your own version control. The visible theme tabs are Overview, Settings, Template, Insights and Publish; the hub does not expose the app-style Build tab for themes.

Workspace and current-version context​

The list searches name, slug and description and normally stays within the selected team. Listing and creation have separate theme policy checks; a visible New theme button does not grant create permission. Slugs are unique across theme definitions. Creation makes version 1 and sets it as the current version.

Overview summarizes current-definition context and at most five recent versions. Publish lists version history without create-draft, publication or editor links. Its Draft badge only reflects is_published; a historical version with a publication timestamp remains read-only. Use the established dashboard version editor for the intended numbered version rather than assuming a badge permits editing.

Settings, Template and library uploads use the current-version pointer. They do not implement Tile's version=ROW_ID selection contract. A historical version must be opened through the dashboard editor with its version number as described below. Record both the displayed number and row ID so they are not confused with each other or the portal installation's pin.

In Settings → General, the Legacy templates switch selects the mode; choose Save changes to persist it before opening Template. Settings' Save changes submits shared name/descriptions plus form schema, mode and additional CSS when the current version is editable. Review unsaved edits across those sections before saving, even if you are currently on General. With a published version, General can still save shared metadata while versioned content is locked. Assets use their upload/delete actions independently of this save bar.

If the current version is missing, ask the owner/platform maintainer to reconcile it through supported version management. Version-content saves return an error; they do not create a draft. Preserve source before refreshing or switching modes. AI enrichment queues descriptive metadata work; its queued result is not a saved or published layout.

Author legacy templates​

Open Template and edit the Public, Private and System templates. Public covers unauthenticated visitors; Private covers signed-in attendees; System covers login, errors and access gates. Each must render the default slot so the actual page can appear.

Start with a small shell on each surface:

<div class="experience-shell">
<header class="experience-header">Conference Portal</header>
<main id="experience-content">
<slot></slot>
</main>
</div>

Use the supported runtime components and props when adding navigation. Legacy templates receive portal settings, language, navigation, assets, user language and filtered navigation. Render the navigation supplied by the platform so excluded content does not reappear through a hand-built menu. The filteredNav(tags) helper selects items matching any requested tag; it does not itself authorize a page or resource. Keep the platform’s page and API permission checks in place. Keep the default slot on every layout branch.

Save template edits explicitly. Add CSS through Additional Styling, and configure branding values through Config Form. Do not force a global reset that breaks the embedded app, form builder or login controls.

Author a compiled layout component​

For a non-legacy version, Template exposes Layout component and Stylesheet uploads. The JavaScript module must export its layout component as the default export. A stylesheet is uploaded separately. The upload controls select JavaScript modules or CSS and limit each file to 10 MiB. Server validation checks the target column and file size; it does not verify that the uploaded JavaScript has a valid default component export. A successful upload therefore still needs a browser load check.

The portal passes layoutType (public, private or system) and filteredNav (a navigation-filter function) to the component and supplies page content through its default slot. A minimal Vue source layout is:

<script setup>
defineProps({
layoutType: { type: String, default: 'public' },
filteredNav: { type: Function, default: () => [] }
})
</script>

<template>
<div class="experience-shell" :data-layout="layoutType">
<header>Conference Portal</header>
<main><slot /></main>
</div>
</template>

Save the source as src/PortalLayout.vue in a GxP Dev Tools scaffold. Complete the toolkit installation and project initialization there before running this command from the scaffold root. Compile it using the toolkit's supported component entry option:

gxdev build --component-path ./src/PortalLayout.vue

The toolkit writes the compiled component to dist/build/plugin.es.js and emits dist/build/style.css when the component has extracted styles. Upload those files to the theme's Layout component and Stylesheet controls respectively. The .gxpapp created alongside them is an app package; the theme upload fields expect the individual compiled files.

A raw .vue file is not the upload artifact. The portal loads the module dynamically in the browser and provides Vue through its runtime; the toolkit rewrites shared Vue imports for that environment. Keep the layout independently renderable for all three layoutType values. Call filteredNav(tags) to request the allowed navigation matching the intended tag(s); it is not an array containing all navigation.

Uploads persist through their upload action; the legacy Save changes action is not the upload mechanism. Published library uploads are blocked, including a version that has a publication timestamp. Continue a changed theme in a new unpublished version. Settings, template saves and library uploads target the definition’s current version, so check that pointer before editing. A missing current draft rejects version-content saves; it does not create a draft automatically.

The Assets section's attachments also belong to the current version. Adding or deleting one requires theme update permission and an editable version; deletion looks up the asset within that version. An attachment upload is separate from the Template tab's Layout component/Stylesheet upload and does not automatically select a compiled layout module. After an uncertain upload response, inspect the persisted file name and reopen the same version before retrying.

Preview limits​

The standalone preview at /{team}/developer/themes/{theme}/preview inserts the current version's stored Public template and additional CSS into an HTML document. It does not mount an installed portal/App, compile Vue runtime template bindings, exercise Private/System layouts or load the uploaded compiled layout component. A successful preview can therefore coexist with a broken actual portal. Use it only for that limited HTML/style inspection, then perform the installed public/login/private/error checks below. The Insights workspace has its own panels and permission rules; see App and Theme Insights.

Version and publish​

The theme hub Publish page currently displays version history; it does not render the app-style release buttons. The established dashboard theme-version editor has a Publishing tab with Publish Current Version. On your dashboard host, open /{team}/plugins/themes/{theme}/versions/{version}, replacing {team} with the owning team slug, {theme} with the theme slug and {version} with its version number (not the database row ID). Use that editor when the hub has no publication action, and confirm the displayed team, theme and version before publishing.

The dashboard publication path marks the version published and can prepare the next editable version. The developer controller's explicit create-version action creates a new version record and does not guarantee a copy of every prior template/library. Check and populate the new version before using it. Inspect its actual version history instead of assuming app draft behavior. In particular, the reviewed dashboard copy payload does not explicitly copy is_legacy or layout_slots; verify the resulting mode, slots, templates, stylesheet and JavaScript on the new draft. The developer publish endpoint marks the selected version published without running that copy workflow, and its unpublish endpoint does not reopen a published version.

In that dashboard model path, the next draft is attempted after publication saves and the highest-numbered version is published. Do not infer that publication and draft creation both succeeded from one success message; inspect the resulting history and uploaded files before continuing.

Authoring an existing theme requires access to its owning team and theme view/update authorization. Public visibility/global-default flags are separate super-admin controls. Publication alone does not activate the theme in a portal.

The developer create-version action moves the current pointer to the newly created row, whose templates/libraries are not automatically copied by that path. Repeated successful calls create additional rows; reconcile the version list and pointer after an uncertain reply before retrying. A default-following portal can resolve that new version before it is published. Record affected portal pins first, and use a controlled installation or an authorized explicit pin before changing the pointer. Preserve the last approved layout artifacts rather than relying on the new row to contain them.

Developer Hub route map​

The routes are under /{team}/developer/themes on the dashboard host, in the authenticated, verified-account and team-context group. Resource GET handlers check owning-team equality and view authorization; mutations require update authorization. List/create use their corresponding model actions. Publication/library/asset handlers scope their version or asset lookups through the theme/current version.

ActionMethod and suffix
List and create formGET /, GET /create
Create definition / open overview redirectPOST /, GET /{theme}
Authoring tabsGET /{theme}/overview, /settings, /template, /publish
Limited standalone previewGET /{theme}/preview
Shared details and current-version settings/templatesPUT /{theme}
Compiled library uploadPOST /{theme}/library
Current-version attachmentsPOST /{theme}/assets, DELETE /{theme}/assets/{asset}
New versionPOST /{theme}/versions
Publish / unpublish requestPOST /{theme}/versions/{version}/publish or /unpublish

Publication path parameters use theme-owned version-row IDs; the legacy dashboard editor URL uses the version number. A visible editor is not proof that a save/upload will be authorized. Backend Build/Git routes are separate from the current visible theme tabs; their presence is not a promise of an App-style authoring flow or release mechanism here.

Install and test​

In the target project's portal configuration, select the theme and appropriate version where authorized, then configure its settings, branding and assets. A nonzero plugin_theme_version_id selects that version; otherwise the runtime resolves the selected theme definition’s current-version pointer. Version selection is independent of whether another version has just been published. Confirm the resolved version on the target portal after a full reload and any relevant configuration-cache refresh. Test a public page, attendee login, a private page and an unavailable/error page. A working Public template does not prove the Private or System template is correct.

On the dashboard host, open /p/{team}/{project}/portals/{portal} with team/project slugs and the portal ID. The portal's super-admin Developer Settings section includes Portal Theme and Plugin Theme Version. The version selector displays numbers but stores row IDs; Use Published Default sets zero and follows the current pointer rather than proving newest-published selection. Ask the responsible administrator to confirm/pin the intended version when that section is unavailable, then save and verify the resolved portal state. The control's UI visibility alone is not a server-side isolation test.

To inspect selection, compare the saved portal's plugin_theme_id/plugin_theme_version_id with the dashboard response's resolved data.theme record and owning definition/current version. For a compiled portal, the actual document/Inertia response's isLegacy, jsLibrary and cssLibrary values and browser module requests provide additional evidence of what loaded. Avoid sharing signed URLs publicly. If the resolved identity is unclear or cached data disagrees, ask the portal/platform maintainer to verify it against the stored portal before accepting the rollout.

The current portal update handler resets the version pin to zero whenever its submitted payload includes plugin_theme_id, even if a version was also submitted. After changing the theme, reload and have the authorized administrator establish/verify the intended pin separately; if the UI keeps sending the theme field and resets the pin, record the request/result and involve the maintainer rather than assuming the displayed selection persisted. For recovery from a bad pointer change, the administrator can select the last approved explicit version on the affected portal, save and verify it through the same checks. This controls that portal's selection; reconciliation of the shared definition pointer remains the theme owner/platform maintainer's responsibility. Do not assume it rolls back every consuming portal.

Check navigation with an excluded attendee, long titles, mobile widths, focus/keyboard behavior, embedded apps, forms and widgets. For compiled themes, test widget behavior on each required surface: the legacy layout's global-component mounting does not imply a compiled theme mounts those components identically.

Troubleshooting​

A shell with no app usually means a missing slot or wrong layout branch. A blank compiled layout calls for checking the module's default export, browser dependency resolution and signed library URL. Missing styles call for checking the selected version and CSS upload. Login or error pages styled incorrectly indicate a missing System layout. Use Project Troubleshooting for portal configuration and version selection.

A version-content save can return 422 when there is no editable current draft; library/asset mutations reject published or historically published versions. Separate those failures from missing update permission, invalid upload column/size, a stale signed URL or an unsupported JavaScript export. After saving, reopen the same current version and verify all three templates or the actual uploaded file names; a timestamp or preview alone does not prove a portal received them.

Retain the owning team, theme/version number and ID, current pointer, mode, source/build artifacts, save/upload result and tested portal pin/default as handoff evidence. On a controlled portal, check public/private/system content, excluded navigation, allowed role behavior and refusals for missing same-team permission, cross-team resources and a foreign asset/version. Live signed-module loading, CSS, cache refresh, widgets and auth/ownership checks remain acceptance requirements even when source examples compile.