This is correct. Understanding loop context is an important part of L&L and it’s explained in detail in this post. It’s not explained quite as explicitly in the docs although the docs do mention “If the Field tag is placed inside a loop, it gets a field value from the current item in the loop.”
In the blog post that I linked above, you’ll want to check out the section called “How can data be passed from the inner content of one loop to the inner content of another?”
Basically, you can set some variables in one loop context and then evaluate them in another loop context. That’s probably the simplest way based on the template you already have. I imagine the most efficient way would be to use If loop exists like <If loop exists taxonomy=listing-type post=current field="title" field_value="Lot"> since that way you can check whether a loop exists in which the title of a term is “Lot” without actually entering that loop and changing the loop context, so you wouldn’t have to set any variables.
Yup, that totally worked to do the <If loop exists... instead of the loop itself. Great call. There was no need to do the loop, just needed to know what was inside of it
I know I’ve chatted with Eliot about this but I can’t seem to find the conversation thread. I’m pretty sure not is a sort of “logic inverter” where it would take the logic and make true logic false and false logic true. So effectively, not exists and not_exists were aliases for each other. I think the idea was to make either syntax work but I’m not sure if that ever got implemented. I’ll see if I can find the conversation and I’ll make sure there’s a feature request about it to ensure that it stays on the radar.
Yeah, I assumed they would be aliases of each other since the logic is the same (at least verbally). Thanks for the bump on the feature request in the meantime.
Doesn’t look like it. I think the consensus was that it might just make more sense to make the not attribute the main way to negate/flip logic, which would certainly make the list of comparisons on the If tag documentation page a lot more concise instead of specifying a something_not for every something comparison. The order of attributes doesn’t matter anyway in HTML/L&L, but having that as a separate attribute gives a bit more flexibility in the “phrasing” of the logic statement so that the person writing it can make it more easily readable.