Redirecting users based on logged in or not Answered
Hello all!
I'm wondering if you guys could help me solve a small issue I'm having with Memberscrips #20 - Save & Unsave CMS Items. It works perfectly fine if the user is logged in, I've managed to also use Memberscripts #24 and was able to only see the saved items on the customer dashboard which is what I needed, BUT I have no idea how to start all of this save/unsave process if the user is not logged in.
Problem 1: if the user is not logged in, I can see both hearts (the empty and the full one). I only want to see the empty one.
Problem 2: When the user is not logged in, how can I link the empty heart to the login page? After the login is done I want to redirect them to the same page so that they can start saving/unsaving items.
Thanks for the help!
Comments
6 comments
Hi Maya ๐ You can add data-ms-content="members" to the red hearts. That way they are only visible when the member is logged in.
I recommend adding an absolutely positioned link to your login or signup form on top of the hearts. You can then give it the attribute data-ms-content="!members" to hide the link when members are logged in.
Let me know if that makes sense. I might have a video I can share... this article is a good place to start though https://docs.memberstack.com/hc/en-us/articles/7403036765339-Show-and-Hide-Individual-Elements-data-ms-content
Hello Duncan from Memberstack you're amazing! thanks for getting back to me. Your solution is actually way simpler than what I came up with ๐
I found this article: https://www.connorfinlayson.com/blog/hide-or-show-elements-on-webflow-membership-sites-with-memberstack-2-0 which helped. I managed to set up the interaction that I wanted when the user is not logged in. So here are the steps of what I did:
Step 1: duplicate the CMS list wrapper that was on the page. set add data-ms-content="members" to the CMS for logged in users, and add data-ms-content="!members" for the CMS visible for the logged out members.
Step 2: remove the full heart (red heart) from the wrapper div that was holding them both, and the attributes from the empty heart (they are no longer needed here and didn't want to cause issues)
Step 3: link a pop-up for login to the empty heart
Step 4: setup the redirect for the login back to the shop page
Step 5: test & tweak!
But again, your solution is so elegant, so simple, compared to my madness. What I did works in my case because I have a small number of products to work with. But yours is so much better!
Hey,
is it possible to create a plan where people with a profile can sign up for, but we (admin) can approve or reject these sign ups?
Hey B ๐ Yes and no. There's no way to do it using dashboard settings, but you can gate access to the signup button. That way only logged in members can click it.
As for the approval process, checkout this article. https://docs.memberstack.com/hc/en-us/articles/11968533725467-Member-Approval-Process
Is there a way to make a button only redirect registered users to a link and unregistered users to the sign up page ?
best option i know of is to just have 2 buttons and hide them with gated content attributes! ๐
Please sign in to leave a comment.