Login applied to a specific page


(Jason Collier) #1

Matrix Version:5.4.7.1

Hi

I’m looking to use a design customisation on a single page that will display content if user is logged in, or a message and login form if they’re not. I found this snippet from another post on the forum:

<MySource_AREA id_name=“login_page” design_area=“nested_content” print=“no” />
<MySource_AREA id_name=“user_name” design_area=“show_if”>
<MySource_SET name=“condition” value=“logged_in” />
<MySource_THEN>
… blah blah …
<MySource_THEN>
<MySource_ELSE>
… blah …
<MySource_PRINT id_name=“login_page” />
… blah …
<MySource_ELSE>
<MySource_AREA>

So I use this in a design asset and then apply it to my page. What do I put in the THEN and ELSE conditions to display either a message and login form or the page content?

Thanks in advance!


(Bart Banda) #2

Logged in content:

<MySource_THEN>
Welcome, you are now logged in, you can now access premium member content! :slight_smile: 
<MySource_THEN>

Not logged in content:

<MySource_ELSE>
You need to log in before you can access premium member content. Use the form below to log in:
<MySource_PRINT id_name=“login_page” />
<MySource_ELSE>