I'm looking to create a condition that triggers for everyone EXCEPT the admin. I know that $user.isAdmin
will work for creating code only FOR the admin; I'm looking to do the opposite. (Maybe even better if it's triggered for everyone EXCEPT logged in users.)
I also would like the condition to return false if the page is the login page.
Can't seem to get this sorted out.
Thanks!
Posts: 8339
!$user.isAdmin
-s
FlashYourWeb and Your Gallery with The E2 XML Media Player for Gallery2
Posts: 1857
Duh! Wow. Thanks!
Is there a way to check for the login page? I tried
$theme.pageType == 'login'
but that doesn't work.Also, should
if (!$gallery->user->isLoggedIn())
work to check for logged in users?Posts: 8339
pageType may just be 'user' don't remember.
try $user.isRegisteredUser or $user.isGuest
-s
FlashYourWeb and Your Gallery with The E2 XML Media Player for Gallery2
Posts: 8339
actually unless a theme specifically implements others the only pageTypes are:
admin, album, photo, progressbar, error and module modules/core/classes/GalleryTheme.class
-s
FlashYourWeb and Your Gallery with The E2 XML Media Player for Gallery2
Posts: 1857
$user.isRegisteredUser
works. (I didn't try$user.isGuest
but I presume that would work as well.That clears up a good bit!
I was able to just use
$theme.pageType != 'album') || ($theme.pageType != 'photo')
; it will likely now also show up on a few other pages, but I'm reasonably sure that it'll work for me.Thanks again!