/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:
- The theme in the
preview_theme_idquery parameter, when it’s one of your company’s MySite themes.fluid mysite devuses this to preview your edits. - The theme the rep chose for their MySite.
- Your company’s default MySite theme, marked Default on the Mysite Themes screen.
- Fluid’s built-in default theme.
Write the theme
Content
Fluid wrapscontent.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.biocan be blank. Skip its block rather than leaving an empty box. - Photo.
fluid_affiliate.imagealways 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.linksandfluid_affiliate.my_site_displayableshold 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 influid_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.
Head
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.
Work on a theme with the CLI
Thefluid mysite commands come from the MySite plugin. Install it next to the Fluid CLI, and sign in:
1
Pull the theme
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
(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
- 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--yesonly when you mean to publish.
Related pages
- Mysite Themes, to add, rename, and customize themes in the admin
- Theme variables, for every
fluid_affiliatefield - Image transformations, to size card images
- CLI, for storefront theme commands