Décision d'accès SmartTag (MM_Access_Decision)

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.

NOTE 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.

En plaçant du contenu en dehors de la balise MM_Access_Decision access=", vous avez la possibilité d'insérer du contenu que tout le monde devrait voir en ne le saisissant qu'une seule fois, mais sachez qu'il ne sera pas protégé et que tout le monde pourra le voir.

Attributs

id (facultatif) - L'identifiant associé à la page/au message sur lequel la décision d'accès doit être fondée. Si cette valeur n'est pas définie, c'est l'ID de la page/du message en cours qui sera utilisé.

accès - Indique le type d'état d'accès à vérifier. Vous trouverez ci-dessous une liste des valeurs acceptables :

ValeurDescription
vraiSi le membre actuel a accès à la page/au message, le contenu de cette balise sera affiché.
fauxSi le membre actuel n'a pas accès à la page/au message, le contenu de cette balise sera affiché.
futurSi le membre actuel n'a pas accès à la page/au message mais qu'il y aura accès dans le futur, le contenu de cette balise sera affiché.
Utilisation
Exemple d'accès courant
[MM_Access_Decision access='true']

Vous avez accès à cette page depuis [MM_Content_Data name='dateAvailable']. Cliquez ici pour visiter la page : <a href="/fr/[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: Ma page protégée

Exemple d'absence d'accès
[MM_Access_Decision access='false']

Vous n'avez pas accès à [MM_Content_Data name='title']. Cliquez ici pour acheter un accès : <a href="/fr/[MM_Purchase_Link productId='1']/">Accéder</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: Accéder

Exemple d'accès futur
[MM_Access_Decision access='future']

Vous n'avez pas encore accès à [MM_Content_Data id='262' name='title']. Vous y aurez accès le [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.

Cet article a-t-il été utile ?

Articles connexes

Vous ne trouvez pas la réponse que vous cherchez ?

Contactez notre équipe chargée de la réussite des clients
Contactez nous !