Search
Other Conditional Content questions
Forum

Conditional content

Patricia Lawson's Avatar Patricia Lawson
Hello Peter,
I am using Conditional Content on our home page: This is our Supply Chain Control Tower. {show accesslevels="Guest"} Login to learn more. {/show}

This works. We use it on several sites.
Except.

I played around with getting rid of the Guest user group since we don't really use it. Ok, dumb idea, for more reasons than one.
I recreated the Guest user group.
But now, the code doesn't work. I thought perhaps you refer to the ID for Guest instead of the Title? The new id for Guest is now 20. On another system, the ID is 9. I tried changing the ID to 9, but that doesn't work either.

I tried inserting your example code:
{show accesslevels="Guest"}
You are a Guest.
{show-else accesslevels="Super User"}
You are a Super User.
{show-else} You are a Registered User.
{/show}

Even when I am not logged in it tells me I am a registered user. When I log in as Super User, it still says I am a Registered User.

I have reinstalled Conditional Content, and applied updates to Sourcerer, et al.

I can use other conditional content such as {show date=">2023-05-10 12:42"}Hello today is May 11{/show} This works.
Looks like I broke the accesslevel area of Conditional Content big-time and need to reinstall from a backup....
Any ideas before I do so?
Peter van Westen's Avatar Peter van Westen ADMIN
A user group is not the same as an access level.
Ask on the Joomla forum, or reference the Joomla documentation on how to set up user groups and access levels.
Please post a rating at the Joomla! Extensions Directory
Patricia Lawson's Avatar Patricia Lawson
Ahh... quite right. I jumped to the conclusion that it was deleting the user group Guest that caused the problem.
I never deleted the Access Level Guest, and yet, the conditional code still doesn't work.
I understand quite a lot about how to set up groups and access levels...

Anywhere I could look to find out why the conditional code accessing Access Levels no longer works on my site?
Peter van Westen's Avatar Peter van Westen ADMIN
Make sure the new Guest used group has the right the guest access levels.
And select the Guest user group as the default for visitors in the global settings.
Please post a rating at the Joomla! Extensions Directory
You can only post on the extension support forum if you have an active subscription and you log in

Buy a Pro subscription