4 votes
Accepted

Why is the OR not working in a conditional statement?

Well here is the issue. You are trying to give OR condition for 2 strings. OR condition will return true if any one of the given statements are true. If you want to execute the code when url_title ...
Mufi - Amici Infotech's user avatar
3 votes
Accepted

How do I display alternative text when there are no active entries in a channel?

The reason your code is not working is because if ExpressionEngine does not return any results, then it doesn't even parse the tags - thus {total_entries} does not even exist in that context. Also ...
Jason Boothman's user avatar
3 votes

Why is the OR not working in a conditional statement?

You should try your code in below manner. {if ! 'portfolio|photos' *= segment_2} <h1>Conditional content.</h1> {/if} You can also try in another way also. {if segment_2 == '...
Harsh Barach's user avatar
3 votes
Accepted

Matching more than one segment

I would use this to check multiple pages: {if "page1|page2" *= segment_2} active {/if}
Mufi - Amici Infotech's user avatar
2 votes
Accepted

Why doesn't navigation conditional work?

See if wrapping segment_3 in matching quotes and curly brackets helps. I think I remember stumbling upon that issue in my early EE days and it dealing with parse order; keeping it matching helped in ...
Kerry Johnson's user avatar
1 vote

Setting up Fields and Logic

If you are using EE5 then one solution would be to use a Fluid field. Set up the Fluid field to allow the user to pick one of three fields (one for each of your cases) and then in your template you ...
JCOGS Design's user avatar
  • 3,585
1 vote

Matching more than one segment

You can try below code. {if segment_2 == "page1" || segment_2 == "page2"} nav-expanded nav-active {/if} I hope this will works for you.
Harsh Barach's user avatar
1 vote

Members only conditional

To add to Blatant's comprehensive answer and keeping native without PHP... {if "|1|6|7|11|" *= "|".logged_in_group_id."|"} ... {/if} Advanced Conditionals
Peter Lewis's user avatar
  • 5,353
1 vote
Accepted

Conditional for entire entries loop

You can't obviously check for just one of them out of stock numerically, so you have to concatenate them together with a key identifier, so for each loop start the total stock with a character "#", ...
Peter Lewis's user avatar
  • 5,353
1 vote

Conditional statement using two different channels

You could do this with an embed by setting your embed with the author_id or author_name as a variable. {embed="templategroup/templatename" authorName="{author_name}"} embed: {exp:channel:entries ...
pixldev's user avatar
  • 589
1 vote
Accepted

How do I make content conditional on domain name?

You can use a conditional with {site_id} or {site_short_name}. If you still want to set the condition based upon on the domain, you can use {site_url}.
pixldev's user avatar
  • 589

Only top scored, non community-wiki answers of a minimum length are eligible