This tag is used to show or hide content based on the currently logged in member's access rights to a particular page/post. MemberMouse's default content protection scheme is to hard-block pages that are protected. This means that if a non-member tries to view a protected page, they'll be redirected to an error page. [MM_Access_Decision] tags provide you with an opportunity to expose portions of protected content based on the visitor's access rights. Within a single page, you could have teaser content for non-members and protected content for paying members. By using the [MM_Access_Decision] tag with different access types you can tailor the visitor's experience on the page.


IMPORTANT NOTE: As soon as you use [MM_Access_Decision access='false'] or [MM_Access_Decision access='future'] on a page/post, you're instructing MemberMouse to bypass the standard hard-block protection mechanism. This means that as soon as you use one of these tags, any content outside of a [MM_Access_Decision access=''] tag, will be visible to anyone who can access the page.


For example, when you use the [MM_Access_Decision access='false'] tag on a page, you're instructing MemberMouse to allow everyone to access that page and that you'll control what they can see by placing content within the appropriate [MM_Access_Decision access=''] tag. Placing content outside of the [MM_Access_Decision access=''] tag gives you an opportunity to insert content that everyone should see while only entering it once, but just be aware that it will not be protected and everyone can see it.


Attributes


id (optional) - The ID associated with the page/post to base the access decision on. If this is not set, the ID of the current page/post will be used.


access - Indicates what type of access state to check for. Below is a list of acceptable values:


ValueDescription
trueIf the current member has access to the page/post then the contents of this tag will be displayed
falseIf the current member does not have access to the page/post then the contents of this tag will be displayed
futureIf the current member does not current have access to the page/post but will in the future then the contents of this tag will be displayed


Usage


Current Access Example


[MM_Access_Decision access='true']

You've had access to this page since [MM_Content_Data name='dateAvailable']. Click here to visit the page: <a href="[MM_Content_Link]">[MM_Content_Data name='title']</a>

[/MM_Access_Decision]


In this example, we're creating an access decision for the current post/page. By setting access to true we're indicating that this content should be seen by a visitor only if they currently have access to the current post/page. For example, if they currently have access they'll see the text:

You've had access to this page since March 1, 2013. Click here to visit the page: My Protected Page


No Access Example


[MM_Access_Decision access='false']

You don't have access to [MM_Content_Data name='title']. Click here to purchase access: <a href="[MM_Purchase_Link productId='1']">Get Access</a>

[/MM_Access_Decision]


In this example, we're creating an access decision for the current post/page. By setting access to false we're indicating that this content should be seen by a visitor only if they don't have access to the current post/page. For example, if they currently don't have access they'll see the text:

You don't have access to My Protected Page. Click here to purchase access: Get Access


Future Access Example


[MM_Access_Decision access='future']

You don't have access to [MM_Content_Data id='262' name='title'] yet. You will get access on [MM_Content_Data id='262' name='dateAvailable'].

[/MM_Access_Decision]


In this example, we're creating an access decision for the post/page with ID 262. By setting access to future we're indicating that this content should be seen by a visitor only if they will have access to the post/page with ID 262 sometime in the future. For example, if they don't currently have access but will sometime in the future, they'll see the text:

You don't have access to My Protected Page yet. You will get access on March 20, 2013.