Starting a thread to share code snippets that work - starting with the IF tag and working with taxonomies. Feel free to share working examples in response.
1. If a taxonomy term exists for an existing post:
<If taxonomy=city post=current>
Do This.
</If>
This says if the current post has a city assigned to it, do something.
2. IF the value of a taxonomy field is X do something.
In this case you have to loop into the taxonomy to get the values of the fields. In my case they are custom fields.
<Loop taxonomy=city post=current>
Then you have two options:
Within the Loop:
<If field=state is="Illinois" >DO THIS.</If>
Don’t forget to close your loop.
Outside of the loop you appear to need to take a slightly different approach, using the SET command. It would look like this
<Loop taxonomy=city post=current>
<Set name=teststate>
<Field state />
</Set>
</Loop>
<If check="{Get name=teststate /}" is="Illinois">DO THIS </If>
Note the is=“Yes” in the old CCS we would have to use compare=“less than” or whatever to compare the variable to the value. So you’ll have to substitute the comparison operators (at If | Tangible Loops & Logic) and swap them out for “is=”