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

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

Simplify segment conditional documentation

The conditional operators that work in EE are listed in the documentation. The two conditional forms you talk about are not equivalent, they just happen to give the same outputs for the inputs 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
Accepted

"URL Segment Support" configs on Apache mod-PHP 7.2 server

The web server just needs to pass environmental variables on to PHP. For segment support, this means that PHP needs the ability to access the portion of the URI after the script name, e.g. the foo/bar ...
Derek Jones's user avatar
  • 2,255
1 vote

convert segments from archive url to date variable and use in template

If you want to keep php out of your template, but still be able to use php string manipulation you could use CE String to do so. http://docs.causingeffect.com/expressionengine/ce-string/index.html ...
pixldev's user avatar
  • 589
1 vote

template_group and template_name not matching segment_1 and segment_2

There was a recent bug for template permissions. Newly created templates couldn't be viewed by anyone, and while this has been fixed in recent versions it's still true for duplicated templates. Go ...
Ingmar's user avatar
  • 506
1 vote

require_entry problems with more than 2 segment

Based on my understanding of the issue... Try this: {exp:channel:entries channel="recipes" url_title="{if segment_2 != 'dessert'}{segment_2}{if:else}{segment_3}{/if}" limit="1" require_entry="yes"...
neetcoder's user avatar

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