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.
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.
OBSERVAÇÃO IMPORTANTE: 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.
A colocação de conteúdo fora da tag MM_Access_Decision access=" lhe dá a oportunidade de inserir conteúdo que todos devem ver, digitando-o apenas uma vez, mas lembre-se de que ele não estará protegido e todos poderão vê-lo.
Atributos
id (opcional) - A ID associada à página/post na qual basear a decisão de acesso. Se isso não for definido, será usada a ID da página/post atual.
acesso - Indica o tipo de estado de acesso a ser verificado. Abaixo está uma lista de valores aceitáveis:
| Valor | Descrição |
verdadeiro | Se o membro atual tiver acesso à página/post, o conteúdo dessa tag será exibido |
falso | Se o membro atual não tiver acesso à página/post, o conteúdo dessa tag será exibido |
futuro | Se o membro atual não tiver acesso à página/post, mas tiver no futuro, o conteúdo dessa tag será exibido |
Uso
Exemplo de acesso atual
[MM_Access_Decision access='true']
Você tem acesso a essa página desde [MM_Content_Data name='dateAvailable']. Clique aqui para visitar a página: <a href="/pt/[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 September 1, 2023. Click here to visit the page: Minha página protegida
Exemplo de falta de acesso
[MM_Access_Decision access='false']
Você não tem acesso ao [MM_Content_Data name='title']. Clique aqui para adquirir o acesso: <a href="/pt/[MM_Purchase_Link productId='1']/">Obter acesso</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: Obter acesso
Exemplo de acesso futuro
[MM_Access_Decision access='future']
Você ainda não tem acesso ao [MM_Content_Data id='262' name='title']. Você obterá acesso em [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, 2024.

