Staff workspace — preview
Wix embed kit
Place the Hub's interactive tools on The Center's Wix Studio pages. Wix keeps its own header, footer and page copy; the tool sits inside the page.
What changes inside a frame
The Hub's header and footer are hidden. The crisis bar always stays at the top. Links to other websites open in a new tab, and an “Open full view” link is always shown.
Frame height
Set the starting height below in Wix. Where Wix allows it, the frame then grows to fit; if not, it simply scrolls on its own. Automatic growing hasn't been tested on your Wix site yet.
Addresses
Use the planned veterans.thecentergb.org addresses once that address is connected. Until then, the test address works for trying things out.
Tools you can place on Wix
Kansas Veteran Snapshot
The homepage data graphic: Kansas vs. Midwest vs. nation, firearms, and VA care connection.
- Planned address
- https://veterans.thecentergb.org/embed/snapshot
- Test address (this preview)
- /embed/snapshot
- Suggested Wix page
- Veteran Services page, below the mission section
- Starting height in Wix
- 1250px desktop · 2350px mobile — grows to fit (add the page code)
Help Me Find My Next Step
Three optional questions that point visitors to resources and the veteran team.
- Planned address
- https://veterans.thecentergb.org/embed/next-step
- Test address (this preview)
- /embed/next-step
- Suggested Wix page
- Veteran Services page, or a “Get Support” page
- Starting height in Wix
- 1500px desktop · 2350px mobile — grows to fit (add the page code)
Veteran Resource Finder
Searchable local, Kansas and national resources with filters.
- Planned address
- https://veterans.thecentergb.org/resources?embed=1
- Test address (this preview)
- /resources?embed=1
- Suggested Wix page
- A dedicated “Veteran Resources” page
- Fixed height in Wix
- 1000px desktop · 760px mobile — scrolls inside the frame (no page code needed)
VA Data Explorer
The full data page: trends, age groups, firearms, VA care and county data status.
- Planned address
- https://veterans.thecentergb.org/data-explorer?embed=1
- Test address (this preview)
- /data-explorer?embed=1
- Suggested Wix page
- A dedicated “Veteran Community Data” page
- Fixed height in Wix
- 1000px desktop · 760px mobile — scrolls inside the frame (no page code needed)
Test frame
This works like a Wix page: it shows Kansas Veteran Snapshot in a frame and grows it using the same height messages Wix would receive.
Waiting for height message…
Setting it up in Wix Studio
- Open the page in Wix Studio and add Embed & Social → Embed a Site (the HTML iframe element).
- Choose Website address and paste the tool's address from above.
- Stretch it to the full width of its section and set the starting height listed for that tool (desktop and mobile).
- In the Properties panel, set its ID to
veteranHubFrame. - For tools that grow to fit, turn on Dev Mode, open the page code panel and paste the code below. Tools that scroll inside the frame don't need it. Publish, then check on a phone.
Wix page code
// Veteran Hub frame — paste into this page's code panel in Wix Studio.
// Change "#veteranHubFrame" if you gave the HTML element a different ID.
const MIN_HEIGHT = 600;
const MAX_HEIGHT = 6000;
$w.onReady(function () {
const hub = $w("#veteranHubFrame");
hub.onMessage((event) => {
const msg = event.data;
// Only accept the Hub's own layout messages.
if (!msg || msg.source !== "center-veteran-hub" || msg.version !== 1) return;
if (msg.type === "HUB_SCROLL_TOP") {
hub.scrollTo();
}
if (msg.type === "HUB_RESIZE" && typeof msg.height === "number") {
// Some Wix layouts don't allow code to change an element's height.
// If yours doesn't, the height you set in the editor is used, and
// the frame scrolls on its own — nothing breaks.
try {
hub.height = Math.max(MIN_HEIGHT, Math.min(msg.height, MAX_HEIGHT));
} catch (e) {}
}
});
});Privacy & security
What the frame sends to Wix
Only its height, and a “scroll to top” signal when the visitor moves to a new page. Never searches, filter choices, answers, page names or anything typed. The Hub ignores messages from Wix.
Who can receive it
Exact approved addresses only — never “any site”:
- https://www.thecentergb.org
- https://thecentergb.org
- https://editor.wix.com
Before going live, check
- On a phone, there's no sideways scrolling and the frame isn't cut off.
- Opening a resource card or switching a chart view doesn't make the frame flicker.
- Tapping “Dial 988”, “Text 838255” and The Center's 24/7 line opens the phone or messages app.
- Keyboard users can tab into the tool and back out to the rest of the Wix page.
- “Open full view” opens the full Hub page in a new tab.

