Skip to main content
A MySite is a rep’s personal page at /my/<username> on your storefront. It shows the rep’s photo, bio, social links, buttons, and the products and content they picked. A MySite theme decides how that page looks. Your reps choose a theme for their MySite, and admins manage the list on the Mysite Themes screen. A MySite theme isn’t a storefront theme. It’s a single template made of three parts:

Which theme a MySite renders

For each visit to /my/<username>, Fluid renders the first of these that exists:
  1. The theme in the preview_theme_id query parameter, when it’s one of your company’s MySite themes. fluid mysite dev uses this to preview your edits.
  2. The theme the rep chose for their MySite.
  3. Your company’s default MySite theme, marked Default on the Mysite Themes screen.
  4. Fluid’s built-in default theme.
Fluid renders the theme’s published version. Every rep who uses a theme sees the same template, filled with their own values.

Write the theme

Content

Fluid wraps content.liquid in its own HTML document, so write only the page body. Don’t add <!DOCTYPE html>, <html>, <head>, or <body> tags: they would nest a second document inside Fluid’s. Fluid adds the page title and Open Graph tags from the rep’s name and bio, and links your stylesheet, so you don’t need to. MySite pages don’t show your storefront’s navigation bar or footer. A MySite theme has no theme files around it. There are no sections, blocks, snippets, or settings schema, and {% render %} or {% section %} tags have nothing to load. Write the whole page in content.liquid. Read the rep’s values from fluid_affiliate. Theme variables lists every field.

Handle empty values

Reps fill in their MySite over time, so design for missing values:
  • Social links. Each social field, such as fluid_affiliate.instagram_url, is blank unless the rep set it. Show each icon only when its URL is set, and hide the whole icon row when none is.
  • Bio. fluid_affiliate.bio can be blank. Skip its block rather than leaving an empty box.
  • Photo. fluid_affiliate.image always has a value. Fluid uses a placeholder image when the rep has no photo.
  • Buttons and cards. When a rep hasn’t added links or picked products, fluid_affiliate.links and fluid_affiliate.my_site_displayables hold your company’s default MySite links and favorites instead. Both can still be empty, so give the page a layout that works without them.

Render each card type

Each entry in fluid_affiliate.my_site_displayables is a card. Branch on its favoriteable_type and read the item from favoriteable: Every card’s favoriteable also has id, type, title, description, and image. Link each card to its url: it’s the item’s address under the rep’s own link, with the rep’s username in it.
Put markup that belongs in the page’s <head> in head.liquid: font links, extra meta tags, or a small script. Fluid renders it as Liquid with the same values as the content, and adds it to the end of the <head>, after its own tags and your stylesheet.
The Add Mysite Theme dialog in the admin has fields only for the content and the stylesheet. Edit the head with the CLI.

Work on a theme with the CLI

The fluid mysite commands come from the MySite plugin. Install it next to the Fluid CLI, and sign in:
1

Pull the theme

Pull writes content.liquid, head.liquid, stylesheet.css, and a .fluid-mysite.json file that records which theme the directory belongs to. Pulling the same theme again overwrites your local files without asking. To pull a different theme into a directory that already tracks one, add --yes.
2

Preview your edits

The first run creates a copy of the theme for previews, named after the theme with (dev …) added, and later runs reuse it. Members can’t choose that copy for their MySite. Each time you save one of the three files, the CLI updates the copy and reloads the page.The dev server listens on port 9293, or the next free port, and shows your own MySite rendered with the copy. It also prints a production preview link, your MySite URL with preview_theme_id set to the copy. Your signed-in user needs a username in the company, so that you have a MySite to preview against.Use --port to pick another port, --live-reload off to stop automatic reloads, and --root <dir> to run against another directory.
3

Publish

The CLI asks you to confirm, then sends your three files to the theme you pulled.
A MySite theme has no draft. fluid mysite publish replaces the theme’s content, head, and stylesheet, and every rep’s MySite that uses the theme changes at once. Preview with fluid mysite dev first.
Publish checks your files before it changes anything:
  • It stops when any of the three files is missing or can’t be read, because sending it would erase that part of the live theme. An empty file is fine, and clears that part on purpose.
  • In a session that can’t answer a prompt, such as a script or an AI agent, it refuses to publish unless you pass --yes. Add --yes only when you mean to publish.
If a rep’s MySite still shows the old version, Reset Cache on the Mysite Themes screen clears the cached copies of your reps’ MySites.