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,587
2 votes
Accepted

Compare url segment and category name with conditional

Found a solution using Low Seg2Cat plugin to get category_id from segment url: {if segment_4_category_id == category_id}active{/if}
frshjb373's user avatar
  • 273
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

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
1 vote

require_entry problems with more than 2 segment

https://ellislab.com/expressionengine/user-guide/urls/template_routes.html Template routes! These things are your friend. On your template, you want to set a template route that looks like this: /...
jrothafer's user avatar
  • 5,900
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

loading country code selection javascript file once per site visit

Use this Session add-on. Add to your head (on every page): {if "{exp:session_variables:get name="js_deployed"}" != "yes"} <script src="{cdn_url}{exp:setversion path='/js/geo.js'}"></...
Peter Lewis's user avatar
  • 5,353
1 vote

SyntaxError on identitcal pages

... My friend, did you check your resources? You are getting an error on the second page because you are accessing your Main.js from relative paths in your template. jatecson.com/information : http://...
jrothafer's user avatar
  • 5,900

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