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.
NOTA 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.
Colocar contenido fuera de la etiqueta MM_Access_Decision access=" le da la oportunidad de insertar contenido que todo el mundo debería ver introduciéndolo sólo una vez, pero tenga en cuenta que no estará protegido y todo el mundo podrá verlo.
Atributos
id (opcional) - El ID asociado a la página/puesto en el que se basará la decisión de acceso. Si no se establece, se utilizará el ID de la página/puesto actual.
acceda a - Indica qué tipo de estado de acceso se debe comprobar. A continuación se muestra una lista de valores aceptables:
| Valor | Descripción |
verdadero | Si el miembro actual tiene acceso a la página/post, entonces se mostrará el contenido de esta etiqueta |
falso | Si el miembro actual no tiene acceso a la página/post, se mostrará el contenido de esta etiqueta |
futuro | Si el usuario actual no tiene acceso a la página/post pero lo tendrá en el futuro, se mostrará el contenido de esta etiqueta. |
Utilización
Ejemplo de acceso actual
[MM_Access_Decision access='true']
Ha tenido acceso a esta página desde [MM_Content_Data name='dateAvailable']. Haga clic aquí para visitar la página: <a href="/es/[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: Mi página protegida
Ejemplo de no acceso
[MM_Access_Decision access='false']
Usted no tiene acceso a [MM_Content_Data name='title']. Haga clic aquí para comprar el acceso: <a href="/es/[MM_Purchase_Link productId='1']/">Obtener acceso</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: Obtener acceso
Ejemplo de acceso futuro
[MM_Access_Decision access='future']
Aún no tiene acceso a [MM_Content_Data id='262' name='title']. Obtendrá acceso en [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.

