Questions tagged [advanced-conditionals]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0
votes
1answer
24 views

Setting up Fields and Logic

I’ve got a filtered portfolio project where the user will be able to add images or videos which pop up (like an overlay) without directing to another page. The user can also opt to add text content ...
1
vote
3answers
40 views

Matching more than one segment

Matching one URL segments always works fine but is possible to match more than one? For example this works: {if segment_2 == "page"}nav-expanded nav-active{/if} But this does not: {if segment_2 == ...
0
votes
2answers
71 views

Different content, different pages in global template

I am absolutely confused on what to do here I have a footer that is meant to be different on each page I setup, I want to edit the link, the image, the paragraph and the header tags to what I choose, ...
2
votes
3answers
96 views

Why is the OR not working in a conditional statement?

Running EE 3.5.15 I am trying to show content based on URL segment and the following is not working correctly: {if "{segment_2}" != "portfolio" || "{segment_2}" != "photos"} <p>Conditional ...
0
votes
1answer
51 views

Conditional statement using two different channels

I have two channels setup, one "blog" and one "authors". The blog channel has all of the blog post entries and the Authors channel has a list of the different post authors. I am looking on a ...
0
votes
1answer
55 views

How do I make content conditional on domain name?

I am wrapping up an MSM build that has one domain and three subdomains. Each site has unique Analytics code. Conditional code based on segment is very useful but I am not sure how to display ...
0
votes
1answer
32 views

Why doesn't navigation conditional work?

I am working on a sidebar navigation here. The navigation works correctly but I am trying to highlight the active entry. In the past I have been able to use a segment_3 conditional to tag the active ...
0
votes
2answers
65 views

Members only conditional

Is there a better way to write this? {if logged_in_group_id == "1" || logged_in_group_id == "6" || logged_in_group_id == "7" || logged_in_group_id == "11"} Hello Members... {/if} It seems very long. ...
0
votes
1answer
58 views

Conditional for entire entries loop

I'm using expresso store and apart from regular products I have gift boxes which contain multiple products. They are a separate channel and I'm using playa to pick the products for each gift box entry....
0
votes
1answer
43 views

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

I have an events channel that displays brief information about upcoming events. Those entries are set to 'expire' when they pass a certain date. When there aren't any pending events I would like to ...
0
votes
2answers
84 views

How do you conditionally embed a template based on template name?

I have created a .header template that goes in all of the content templates on a site. However, there are only two templates that require additional jQuery code inside the .header template. I don't ...
0
votes
1answer
66 views

Need help to stop inner conditionals from parsing with with nested conditionals and stash

I'm really stuck and I know it's likely something small that I'm missing. I read the page in the wiki that relates to stash conditionals (https://gist.github.com/croxton/9d012297096892ca5c10), but I ...
0
votes
1answer
87 views

If statement with a variable

Is it ok to use an early parsed variable/snippet with the following inside? logged_in AND member_group == "1" OR member_group == "2" OR member_group == "3" So that i can use the following at the top ...
0
votes
2answers
76 views

IF conditional using segment_url leave a blank space in text

In creating page titles based on URL segments (for list pages), we have utilized conditionals that point to the segment urls for conditional inclusion. HOWEVER when the page source is viewed (and the ...
1
vote
1answer
1k views

Conditional logic inside of <script> tags

Having issues trying to wrap logic inside of <script> tags, it seems my "if/else" statements get printed instead of parsed? As an example, if I do something like: {exp:query sql="SELECT ...
1
vote
1answer
46 views

How do I limit content display based on Categories selected?

Under most circumstances this would be an easy answer, but I have a slightly trickier segment I am working with. The following code displays the category names if they are selected in the entry: <...
0
votes
2answers
55 views

How do I write a conditional based on search results?

I have a section set up to display contents based on category URL information and it works great. However, when I do a search, the search result URL has a unique value in segment_4 that doesn't fit ...
0
votes
1answer
358 views

Conditional Breaks after 2.9 upgrade

I was successfully using the following block of code until I upgraded to EE 2.9.0. {exp:query sql="SELECT COUNT( * ) AS itemCount FROM exp_freeform_form_entries_4 WHERE form_field_52 = 'yes'"} ...
1
vote
2answers
379 views

is it healthy to built a web services or a web app using EE?

we are growing company and we support and use EE for more than 4 years and continues, because we believe in it, and it is our choice ever. Any ways, I was in interesting discussion with a developer ...
0
votes
3answers
511 views

Showing Channel Image gallery IF there's more than 1 images?

How to show a channel image gallery if there is more than 1 images inside? {exp:channel:entries channel="journal" limit="1" url_title="{segment_3}" disable="categories|member_data|pagination|...
1
vote
2answers
493 views

parent total count playa conditional

Hey I am trying to use conditionals with Playa. I can't seem to get the following code to work {if {exp:playa:total_parents channel='listing'} > '0'} <section class="listing-cards"> ...
0
votes
1answer
856 views

Parent Relationship Conditional — if not empty

I have had no luck in trying to sort a conditional that will only show the following if the category is not empty for the parent relationship. <h3>ARTICLES</h3> {parents orderby="date" ...
0
votes
1answer
45 views

Why is this comparison check not working on a Windows box?

I've set up the following code on a site. On my Mac (dev version - identical to the running live code) the template looks like this: {if '{current_path}'=='/'} ... {/if} And this works fine. But the ...
1
vote
1answer
304 views

Syntax error, unexpected T_ENDIF

I have the following code in my templates: {exp:channel:entries channel="cover" limit="5"} {if total_results > 1}More than one{/if} {covervid_bg_video limit="1"}{file:url}{/...
0
votes
1answer
295 views

how to put a category condition with exp:query?

{exp:query sql="my query"} {/exp:query}. This works fine.But I want to give a category condition to it.When I do it,it does not flter the data accordingly. for example: {exp:entrie:channel ...
1
vote
2answers
64 views

Advanced conditional in Category_Archive Channel to show “active” entry (using Structure)

I have wrapped this in a Snippet to advance the parsing order, but I cannot seem to get this to work...hence the {?}. <ul class="accordion"> {exp:channel:category_archive channel="hurricane" ...
3
votes
1answer
226 views

Can we use member_group instead of logged_in/out?

I am creating a members only section and I am wondering if I can use the member_group variable, on its own, to check if a user is logged in or not. My assumption is that using both the logged_in ...
0
votes
1answer
688 views

Problem using Stash in conditional structure

I posted this in the Stash support forum on Devot-ee, but there's more activity over here so I thought I'd try my luck in both locations. Not sure about the etiquette of posting in two forums, so ...
1
vote
1answer
291 views

Weird issue with 404 redirect and no results

I'm having a strange issue (possible bug?) with the following (simplified) code {if segment_1 == ""} //Do Stuff// {if:else} {exp:channel:entries limit="1" status="Open" url_title="{segment_1}" ...
0
votes
1answer
105 views

Max number of if statements?

Folks: I'm wondering if there's a maximum number of if statements allowed before things fall apart. I'm evaluating if a field has content. If no, display nothing. If yes, display whatever I say. ...
0
votes
2answers
77 views

Is this a parsing issue with advanced conditionals?

I have a header snippet that includes a "Made in USA" image on it. Well the client now wants the image removed on a couple product pages. I setup an advanced conditional to check for those pages using ...
0
votes
1answer
361 views

FIlter entries by category without refreshing the page

I have a page that displays all entries in a "stories" channel. Each story is categorised and I need there to be an option to filter by these categories. Here is the code I currently have: <div ...
1
vote
2answers
895 views

Using conditionals to set tag parameters

I have this opening low search result tag {exp:low_search:results {if segment_2}query="{segment_2}"{/if} group_id="7" limit="4" paginate="bottom" } I wanted to do more checks on segment_2 ...
2
votes
1answer
2k views

How do I compare date values?

I would like to create a conditional based on the value of a date field compared to today's date. In English it would be: if Expiration Date is less than today's date set class to "expired" Here is ...
0
votes
2answers
256 views

'Fuzzy' conditionals

feeling little dumb for this. What I am trying to do is to make my list of checkboxes checked depending on {segment_5} If the value is '6', that is easy with <input type="checkbox" name="...
2
votes
1answer
189 views

parse order and nested conditionals

Can i nest simple conditionals and are nested simple conditionals still parsed early? What happens when nesting an advanced conditional inside a simple conditional? (wiki answer)
3
votes
2answers
1k views

PHP Syntax Error from ExpressionEngine Template

Here's some code I'm using to generate Breadcrumbs on my site. Unfortunately the client has quite specific requirements in terms of URLs, so I've had to play around with Crumbly's tag a little using ...
1
vote
1answer
101 views

If statement with OR always returning TRUE

I'm doing lots of checks against segments to try and perm redirect a very large list of old URLs and seem to have run into an issue with conditionals. {if segment_1 == 'category' OR segment_1 == '...
0
votes
1answer
120 views

Playa with conditionals and snippets

I seem to have a problem with Playa + conditionals + snippets. I've emailed P&T since it may be an error in Playa. I'm trying to accomplish a listings page where the information displayed depends ...
2
votes
1answer
58 views

Can we count an if result and change the resulting text?

I'd like to be able to use an if statement to determine what to show based on the amount of results from the if statement in a reverse related entry. For example: If an actor has two stage names, ...
2
votes
1answer
99 views

Basic conditionals not working after update

I just did some really really basic updates to my site, and now I'm having some extremely weird behavior. Take this conditional for example: {if '{expiration_date format="%U"}' <= '{current_time ...
6
votes
1answer
122 views

How can I prevent a {switch} tag from cycling unless a Switchee case or advanced conditional is true?

I have a channel entry loop that is outputting entries from three different channels. Entries from each channel are marked up differently, so I have a Switchee case with the value of ...
3
votes
1answer
161 views

Conditional For Entry Listing Pages Only

I have some code inside a global snippet that I only want to display on a blog listing page. So the allowed URL types could be: /blog /blog/P10 /blog/category/crackers /blog/author/skeletor I do not ...