I have this code

{exp:low_replace find="\r|\n|\t" replace="" regex="yes"}
    {if '{member_group}' == 7}
    {if '{logged_in_member_group}' != 7}
    {if {logged_in_member_group} == '7'}
    {if {logged_in_member_group} != '7'}

The output is

zzz yyy xxx www 7

This is weird because the output of {member_group} is 7.

Why are the conditionals not matching?

  • Did you ever figure this one out? If so, it is helpful if you mark an answer correct. – Stephen Callender Dec 9 '13 at 11:30

Member defined variables like {member_group} are parsed last by default, so your advanced (not simple) conditionals will never properly read the member data. View parse order pdf by Low.

You need to install an add-on to move the parsing of the member defined variables earlier. Try Low Variables, Mo' Variables, or any other add-on that has this feature.


First off, you can't have any "else" statements in your conditional or it will be considered "advanced".

But more importantly in relation to how you're writing these: Simple Conditionals aren't just about the operators, control structures & variables, but the format is actually critical.

The actual format must be:

{if early_parsed_variable == "string"}

Basically the left-hand side must NOT have curly brackets or quotes; and the right-hand side MUST have quotes. This is the exact and only pattern that EE looks for when trying to hunt down a Simple Conditional - along with the other requirements.

It's bewildering I know - it promted me to write a post about all the times you might think you've written a Simple Condition, but haven't:


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.