Skip Navigation

[Gelöst] show overlay if user clicks on a link to a page with no access

Dieser Thread wurde gelöst. Hier ist eine Beschreibung des Problems und der Lösung.

Problem: I would like to show two different links depending on whether or not the current User has access to the link destinations.

Solution: Inline content access control can be accomplished with either Access Control shortcodes or conditional HTML. If your access conditions are defined by User Role, then you can use toolset_access shortcodes to display link A to certain roles, and display link B to other roles:

[toolset_access role="Guest" operator="allow"]link a[/toolset_access]
[toolset_access role="Guest" operator="deny"]link b[/toolset_access]

Relevant Documentation: https://toolset.com/documentation/user-guides/access-control-texts-inside-page-content/
https://toolset.com/documentation/user-guides/conditional-html-output-in-views/

This support ticket is created vor 7 Jahren. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Heute stehen keine Supporter zur Arbeit im Werkzeugsatz-Forum zur Verfügung. Sie können gern Tickets erstellen, die wir bearbeiten werden, sobald wir online sind. Vielen Dank für Ihr Verständnis.

Sun Mon Tue Wed Thu Fri Sat
8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 - -
13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 - -

Supporter timezone: America/New_York (GMT-04:00)

Dieses Thema enthält 2 Antworten, hat 2 Stimmen.

Zuletzt aktualisiert von Matthias Reichl vor 7 Jahren.

Assistiert von: Christian Cox.

Author
Artikel
#587676

Tell us what you are trying to do?
Show an overlay if user clicks on a link to a page where he has no access

Is there any documentation that you are following?
I only found that I can show a 404-page or a specific page layout

Is there a similar example that we can see?
versteckter Link
in the center column click on "weiter" at the first article listed

What is the link to your site?
versteckter Link

#587731

Hi, inline content access control can be accomplished with either Access Control shortcodes or conditional HTML. If your access conditions are defined by User Role, then you can use toolset_access shortcodes to display link A to certain roles, and display link B to other roles:

[toolset_access role="Guest" operator="allow"]link a[/toolset_access]
[toolset_access role="Guest" operator="deny"]link b[/toolset_access]

More info about these features here:
https://toolset.com/documentation/user-guides/access-control-texts-inside-page-content/
https://toolset.com/documentation/user-guides/conditional-html-output-in-views/

#587944

Thanks a lot for your help.