When member storefront is off, every helper renders its guest value and nothing else, so you can add these to a shared theme safely.
Choose the helper
Your templates stay Liquid. There is no schema key to set and no per-section switch. Using a helper is the opt-in.
Greet the member
Combine{% member %} and {% member_name %}:
<div>. The member branch carries hidden until the SDK confirms a member is viewing:
{% else %} branch renders, with no wrapping element. {% member_name %} on its own renders nothing when disabled, which is why guest text belongs in the {% else %} branch rather than inside the name shell.
The {% else %} branch is optional. A {% member %} block without one renders nothing for guests. Neither tag accepts arguments, and a block accepts only one {% else %}.
The branches are block elements. Wrap them in the element you want to style rather than placing them inside inline text.
There is no member variable
Storefront Liquid has nomember object. {% if member %} is always false, so it renders nothing.
This is deliberate. Storefront pages are cached once per path, country, and language, and the same HTML is served to every visitor. If the server knew who was looking, one member’s page could be cached and served to everyone.
Member page templates are the exception. They render on every request for the signed-in member and are never cached, so they read a member value directly and do not use these helpers.
How a section becomes member-aware
Fluid marks a section by reading its rendered output. When the output contains at least one name or branch shell, the section wrapper gainsdata-fluid-member-storefront="true":
{% render %} counts.
Name shells and branches are resolved only inside a marked section. Price shells are different: they are hydrated anywhere on the page and need no marker.
What the SDK does in the browser
The SDK is one script with no dependencies. Fluid adds it for companies with member storefront enabled. You do not add it to your layout.Hydration requires the SDK to be configured for your environment. Without it, every visitor sees the guest fallback. That is the designed behavior of a shell, so a theme using these helpers is correct before hydration is available and unchanged after.
<fluid-member-name> with the member’s display name, shows member branches, and hides guest branches. The member’s identity is never read from the URL or from browser storage, and never appears in the cached HTML.
Each shell gains data-fluid-member-settled once it has written a value or decided to keep its fallback. A section becomes resolved when every shell inside it is settled, or guest when the session turns out to be absent or expired.
Resolution states
The SDK never throws into the page. A network failure or an unexpected response leaves the fallback in place and settles the shell. An expired session restores every value the SDK wrote anywhere on the page and sets every section to
guest.
Shells and sections inserted after page load are handled too. A shell added to an already-resolved section resolves on its own. Name shells inserted outside every marked section are ignored.
When the page regains focus, or returns from the browser’s back/forward cache, the SDK re-checks the session, so member content never outlives the session that produced it.
Style on resolution states
The state attributes are stable hooks. Nothing in the SDK depends on how you style them.hidden on a guest branch and do not remove it from a member branch: the SDK owns both.
Test your section
- Feature disabled. Render the section and confirm the output matches the version without the helpers. No shells and no section marker.
- Guest, feature enabled. Confirm the page looks identical to the disabled render. In the HTML, confirm
memberbranches carryhiddenand the section wrapper carries the marker. - Signed-in member. Confirm
<fluid-member-name>fills and thememberbranch replaces theguestbranch. Sign out and confirm it reverts.
Troubleshoot
Related
- Member pricing for prices, which need no helper at all.
- Sign in and sign out for the session these helpers depend on.
- Account menu for a cached header that knows the member.