Restricting Content Syntax

  • What No Website
  • Topic Author
  • Offline
  • Platinum Member
  • Platinum Member
  • Full Stack Developer
More
7 years 11 months ago #98197 by What No Website
Restricting Content Syntax was created by What No Website
I was wondering if it might be possible to restrict content to seubscribers of a group.

For example:

{mprestriction ids="!1"}
To restrict content to users of this group but display to NON SUBSCRIBERS
{/mprestriction}

Joomla & Hand Coded Web Design
What no Website

Please Log in or Create an account to join the conversation.

More
7 years 11 months ago #98233 by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic Restricting Content Syntax
That will display the text for all the users who has not subscribed for the plan with ID = 1 yet. If you want to show the text for NONE SUBSCRIBERS, replace 1 with *

{mprestriction ids="!*"}
To restrict content to users of this group but display to NON SUBSCRIBERS
{/mprestriction}

Please note that you will should have latest version to use this option. It was added to the system sometime ago but I don't remember exactly the time it is added

Regards,

Tuan

Please Log in or Create an account to join the conversation.

  • What No Website
  • Topic Author
  • Offline
  • Platinum Member
  • Platinum Member
  • Full Stack Developer
More
7 years 11 months ago #98241 by What No Website
Replied by What No Website on topic Restricting Content Syntax
This worked beautifully, thanks:
Code:
{mprestriction ids="!1"}

Would this work too...?
Code:
{mprestriction ids="!1 || !2"}

Joomla & Hand Coded Web Design
What no Website

Please Log in or Create an account to join the conversation.

  • What No Website
  • Topic Author
  • Offline
  • Platinum Member
  • Platinum Member
  • Full Stack Developer
More
7 years 11 months ago #98242 by What No Website
Replied by What No Website on topic Restricting Content Syntax
I went with this actually, works perfectly well. No need to over think it. Thanks very much ;)
Code:
{mprestriction ids="!*"}

Joomla & Hand Coded Web Design
What no Website

Please Log in or Create an account to join the conversation.

More
7 years 11 months ago #98287 by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic Restricting Content Syntax
Yes. And {mprestriction ids="!1,2"} will show the text to the users who has not subscribed for the plan with ID = 1 or ID = 2 yet. So it is quite flexible

Tuan

Please Log in or Create an account to join the conversation.