How to control button display logic for different subscription plans (monthly, yearly, lifetime) and guest users? Answered
Hi there,
I’m building a subscription site in Webflow. At the moment I have 2 family memberships with access to different content each. In the navbar in the homepage I would like to have a Dashboard button that is only visible once you are logged in. Is that possible? I have seen that with attribute “data-ms-content=!members” you can hide a button once people login, but I want the contrary. I want to show a button when they login
Also, if possible, I would like that button to bring the users to the default page in Memberstack after they login (different for each family member). Is that possible?
In summary:
- Create a Dashboard button only visible to logged-in members
- Create a Dashboard button that brings logged-in members to the default page in Memberstack once they login.
I’m probably missing something and will appreciate if someone could guide me in the right direction.
Thanks
Comments
3 comments
This article is what you're looking for. https://docs.memberstack.com/hc/en-us/articles/7403036765339
Show content if logged in
data-ms-content=”members" → This content is visible when a member logs in… and hidden if they log out. This data attribute works with any Memberstack project.Show content if logged out
data-ms-content=”!members" → This content is visible when a member logs out… and hidden if they log in. It’s handy for hiding elements that are annoying or redundant for logged-in members. For example, you can add data-ms-content=”!members” to your signup and login buttons to hide them when a member logs.
Hope this helps!
Hey Team!
can someone help me solve this 3 usecase, how should i achieve this?
I have 2 more use-case:
i tried using this attribute, but its not working
Check this loom video: https://www.loom.com/share/bcd23e7ef4ca4a2f809ef438b8fe08c1?sid=29b804ef-96fa-4b10-bad0-7283a95bdab0
Hey Mubassir Shaikh, you can do this by adding the following memberstack attributes to the buttons:
Usecase 1: data-ms-content="paid-plans"
Usecase 2: data-ms-content="!members"
Usecase 3: data-ms-content="free-plans"
You can find a guide on more such attributes here. Hope this helps.
data-ms-contentattribute that you have setup for the yearly button on the site. Follow the same process for the lifetime plan and you should get the results you are intending to have.Please sign in to leave a comment.