CMS Development

rohansdeeson
Top Contributor

Membership Login Redirect

SOLVE

So on my site I have in the settings a standard page to send people when they login, which is the my account page.

 

However if they are on a particular page say www.mysite.com/testpage 

and I direct them to login, I want them to return to www.mysite.com/testpage when they are finished, in other CMS platform this is achieved by sending a login redirect parameter to the login page is this possible in hubspot

0 Upvotes
1 Accepted solution
stefen
Solution
Key Advisor | Partner
Key Advisor | Partner

Membership Login Redirect

SOLVE

@rohansdeeson @dennisedson you can set a query parameter on the login page like so:

{% if request_contact.is_logged_in %}
    You're signed in!
{% else %}
    <a href="/_hcms/mem/login?redirect_url={{contact.hs_analytics_last_url}}">Log In</a>
{% endif %}

 

Stefen Phelps, Community Champion, Kelp Web Developer

View solution in original post

2 Replies 2
stefen
Solution
Key Advisor | Partner
Key Advisor | Partner

Membership Login Redirect

SOLVE

@rohansdeeson @dennisedson you can set a query parameter on the login page like so:

{% if request_contact.is_logged_in %}
    You're signed in!
{% else %}
    <a href="/_hcms/mem/login?redirect_url={{contact.hs_analytics_last_url}}">Log In</a>
{% endif %}

 

Stefen Phelps, Community Champion, Kelp Web Developer
dennisedson
HubSpot Product Team
HubSpot Product Team

Membership Login Redirect

SOLVE

@stefen , any sage advice you can offer 😀

0 Upvotes