inherit
220772
0
Mar 24, 2023 21:43:23 GMT -8
Tiffy-Bean
I support plugin and theme makers rights to create themes and plugins that are paid for.
1,052
April 2015
tiffythecodingwhiz
|
Post by Tiffy-Bean on Nov 9, 2017 19:19:17 GMT -8
When doing if/else commands in the layout templates, is there any way to get it to recognize that if the member is part of that group (even if it's not their main display group) to do a command?
For instance I want to use:
{foreach $[user.group]}{if $[user.group.id] == "60"}<img src="https://i.imgur.com/P63E5kj.png">
{/if} {/foreach}
However, if the users are part of multiple groups, and group 60 isn't their display group (or first group on their profile) it doesn't show up. Is there a way that I can force this to do it just if they're a member of group 60 whether it's their default group or not?
|
|
Kami
Forum Cat
Posts: 40,199
Mini-Profile Theme: Kami's Mini-Profile
#f35f71
156500
0
Offline
Jul 24, 2021 11:48:29 GMT -8
Kami
40,199
July 2010
kamiyakaoru
Kami's Mini-Profile
|
Post by Kami on Nov 9, 2017 21:16:31 GMT -8
Tiffy-Bean - Hey hon! Long time no see (: To answer: No, there isn't. The variable only targets whatever is displayed. The only work around I can think of is to use custom fields to have a yes/no field for the other groups (used along with Brian's Custom Field Modifier so you can set certain fields to staff-only if necessary, with the obvious caveats about plugins not affecting mobile view/no javascript) and specify an if/else statement so that IF the field name's field value is "yes", it displays your image. Hopefully that makes sense!
|
|
inherit
220772
0
Mar 24, 2023 21:43:23 GMT -8
Tiffy-Bean
I support plugin and theme makers rights to create themes and plugins that are paid for.
1,052
April 2015
tiffythecodingwhiz
|
Post by Tiffy-Bean on Nov 25, 2017 0:02:41 GMT -8
You're a genius Kami, as always. Yes, long time no see! I hope you're doing well! Thank you for answering. I think I will try your suggestion. Honestly, I always feel a little silly when I don't think of things like that. It seems like the obvious answer, but my brain just didn't go there at all. lol
|
|