For questions that use logic to display or hide parts of a page/template

learn more… | top users | synonyms

1
vote
1answer
23 views

Conditional if else Problem

I have an additional title called {long_titles}, but do not use it for every entry. However, when I do use it, I want to suppress the {title}. I have tried several approaches but can't get it. Needs ...
0
votes
2answers
12 views

Logged out redirect not working for cartthrob:add_to_cart tag

I have add to cart buttons like this: <a href="{entry_id_path='weekend-courses/add-to-cart'}" >Book now</a> 'weekend-courses/add-to-cart' contains only this: {if logged_out} {...
0
votes
2answers
23 views

404 Redirect when there are too many segments

Having some issues forcing a 404 redirect when there are too many segments. Here is the page I am working on http://syntropy.highimpact.com/case-studies/aurora-flight-sciences/ I'm using the ...
0
votes
3answers
20 views

display last 6 entries in a channel

Have events channel have 10 entries (the channel can have varying range of entries for example it has 10) have a date field called event_start_date ex. current date is 2016-05-30 Desire - ...
0
votes
1answer
23 views

'IF' Conditional Not Working

I want to set up a conditional that when correctly running will post a 'widget' on the sidebar based on the entry. I have eight events (concerts) and three venues. On the individual detail page, I ...
0
votes
2answers
21 views

conditional statment to display all entries that are from today and forward

Have events channel have 10 entries have a date field called event_start_date Desire - display only up coming events in asc order List 2016-12-06 2016-11-01 2016-10-24 2016-05-30 2016-09-12 ...
0
votes
1answer
24 views

Conditional statement error inside relationship field

I have a relationship problem and I figured Stack Exchange can help ;) I'm using the standard relationship field in EE 2.8.1 but the conditional statement just keeps throwing an error; {...
0
votes
1answer
29 views

if statements that can alter a layout

Im working on a project where there are two divs next too each other (not worried about the styling for now) but my question is the following. div 1 | div 2 if there's no channels fields in div ...
0
votes
2answers
13 views

Template that detect if an entry has “All Categories” and then if “Any Categories”

I have a series of entries in a channel called "Messages" that need to appear in different ways according to if ALL categories have been assigned, or if less than all have been assigned. The most ...
0
votes
1answer
23 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
1answer
18 views

conditional if statements for channel fields

Im running into a bit of a problem, i have two channels which are called on a single page, displaying the latest entries from each. these two channels have different fields setup for descriptions ...
0
votes
2answers
24 views

Conditional {if} and {if:else} Getting Error Message

I get an error message each time. "You have an invalid conditional in your template. Please review your conditionals for an unclosed string, invalid operators, a missing }, or a missing {/if}." Stuck ...
0
votes
1answer
12 views

RSS feed from 2.1.4 no longer works with conditionals in 3.2.0

We just upgraded to 3.2.0 from 2.1.4, and the move seems to have broken my RSS feeds completely. I used several conditionals to assign the correct paths to each template group section, but none of ...
0
votes
2answers
33 views

Can't get Grid conditionals to work in 2.10.3

I've been trying to get a Grid conditional to work (using EE2.10.3) and no matter what I try, it's not working and the page crashes. My grid field is called "projects_video" and I want to output ...
0
votes
1answer
16 views

Conditional with if and ifelse not working

Every entry has one image {event_feature_image_01}, however, some entries have a second, third and forth image. I want to count backwards from the forth image {event_feature_image_04}. Every entry has ...
0
votes
2answers
24 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
2answers
30 views

Category Conditional

This works fine but I want to “limit” the number of times the snippet shows up at the top of each entry, I only want it to show up on the top (one time in category “7”, no mater haw many entries. ...
0
votes
1answer
20 views

{member_group} not working in conditional

I have the following code: {exp:member:custom_profile_data} <div class="profile"> {member_group} {if member_group == "Super Admins"}You are a Super Admin{/if} ...
0
votes
1answer
38 views

DevDemon Forms can't get any conditionals to work

I'm desperate. I've purchased Forms several times for different clients, and recently upgraded to a developer license since it provides such great functionality for us. I've come up against a problem ...
0
votes
1answer
30 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
24 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
34 views

Help with date conditionals

Need help to get this to work: {if {current_time} >= {exp:str_to_time date="November 6th, {current_time format='%Y'}"} && {current_time} <= {exp:str_to_time date="January 7th, {...
1
vote
0answers
32 views

Channel Loops, Conditional Statements, Grids and Whitespace

I'm running into a bizarre issue with EE that I've never noticed before (using v2.10.1). I'm using a "justified" grid where you set your column container to text-align: justify, give them the right ...
0
votes
1answer
28 views

Conditional Check Issue || Is Entry in any of these Categories?

Scenario The issue is that entries are in several categories and can be Featured (a FieldPack pill with yes/no options) but only want certain categories to show the entry. So I have a ...
0
votes
1answer
43 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
64 views

Conditionals: Use relationship fields within a grid field as variables?

I have a grid field that contains a relationship field. I want to alter the output according to whether or not a particular field in the related entry contains data or not. For instance: {if ...
2
votes
3answers
45 views

Limiting entry display after a conditional

I want to display 10 entries, only if they pass a conditional. Right now the channel tag will count all entries first, so I end up with less than 10 entries displaying (as some of those 10 don't meet ...
0
votes
0answers
29 views

Display on front-end grid items with relations

I have 3 channels a,b,c 1) Channel "c" have relations select fields in a grid. I would like to create an conditional select fields in a grid. So if select1 > option1 in first it will show options for ...
0
votes
1answer
24 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 ...
0
votes
2answers
53 views

Prevent first entry to be shown conditional

I'm trying to prevent that the first entry has a certain class in this case the class 'wide'. I call the class from a channel-field called {format}. But i want the use the param orderby="random" in ...
1
vote
1answer
51 views

Use conditional to check that the current user is the author of the post

How can I check that the current user is the author of the post? Something like this?... {if author_id="CURRENT_USER"}{/if} (My setup is basically an entries loop, with a snippet inside of that ...
0
votes
0answers
11 views

Contains Conditional throwing PHP Warning

Using Taxonomy, we can add css classes to the list item. I want to check if the "open" class is among the classes listed, but I get this error (only when logged into the system): A PHP Error was ...
0
votes
1answer
22 views

Compare url segment and category name with conditional

I'm trying to write a conditional so that the I can output an active css class when the url segment is the same as the category name. Because the url segment includes dashes between each word and ...
0
votes
1answer
67 views

Conditionals using current time format

does anyone know why this code will not display correctly? It looks right to me. {if "{current_time format='%d.%m'}" >= "06.11" && "{current_time format='%d.%m'}" <= "07.01"} 6 Jan {if:...
0
votes
1answer
21 views

Add active class to Solspace Tag list

I have a list of tags on my site and want to add an active class to the linked tag based on the URL. For example, if the user is on the URL http://whatever.com/blog/by_tag/control+system+failure, I ...
0
votes
1answer
39 views

Date conditionals not working as they should

Im using this code which as of todays date should display 11 Sept but instead it displays 20 Feb?? Cant figure out what is wrong {if {current_time format="%d.%m"} >= 06.11 && {current_time ...
0
votes
2answers
19 views

Solspace Calendar - Occurrence

I have two different types of events that show up on the same template. If the event is a multi-day event, I classify it as such using a category. If it is a single day event, it is classified as ...
1
vote
2answers
37 views

EE Conditionals failing due to '' and “”

I have this conditional: {if '{spieldaten_datum:first unit="month"}' == 'y'} Blabla whatever {/if} On my mamp environment with php 5.5.10 it all looks fine. On my live Server with php 5.5.26 a ...
0
votes
2answers
41 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 ...
0
votes
1answer
32 views

Conditional Statements to show Open Hours

So I want to show "Open-Now" if the current time is in betwee in the open hours (which are put in a grid time select field). This is what I have right now: {if {current_time format="%h"} >= {...
0
votes
1answer
35 views

Conditional Not Working

I have an events listings. Events are by “start_date”. When I have no events I want to display “NO EVENTS SCHEDULED” When I have events I want to remove the NO EVENTS SCHEDULED. I can’t seem to get ...
0
votes
2answers
41 views

Can't do “if” conditional with FreeForm field unless I output the field elsewhere?

Inside an {exp:freeform:entries} tag, I can't do something like {if freeform:count == 1} unless I output {freeform:count} somewhere in the loop. It can be above or below the conditional. Doesn't work:...
0
votes
1answer
58 views

How do I check for a null or blank snippet?

I want to have some fallback text for when a snippet isn't available. I tried this: {if '{snip-start-to-end-dates}' != ""} {snip-start-to-end-dates} {if:else} Long-term Installation {/if} ......
1
vote
1answer
131 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 ...
0
votes
2answers
45 views

Grid conditional for a file(s) - If file exists display content (file)

I have a grid field (files), with a column/variable (file). I just need to display my content/snippet if a file has been uploaded. So something like: {if files:file}link to my file{/if} Any help ...
1
vote
1answer
41 views

Wish a bit help with conditionals and operators

Im trying to show results after search so that if there is under 10, it shows A, but if there is more than 10 results, it shows B. But I dont understand how to make this happen. I tried this but it ...
0
votes
1answer
67 views

How to use page transitions with Expression Engine

I'm trying to use page transitions using smoothstate.js (http://miguel-perez.github.io/smoothState.js/). What this appears to do is to load the destination of a link in the background when the link ...
0
votes
2answers
63 views

Conditional statement syntax

I am working on an Expressionengine site at the moment, the client would like the ability to choose if there's a custom phone number in the sidebar of the page and if non is entered it just shows the ...
0
votes
1answer
61 views

Display entry title related to (channel images) image if exists

I have a channel named Projects, and within that channel i have a 'channel images' field (p_feature). It allow the user to upload one image, and if they do so that image will appear on the Home page ...
0
votes
2answers
32 views

How do I check for an empty field in a child entry?

I have an Event entry which can has one child Location entry. The Location entry has two fields: Title and Floor. Sometimes floor is empty so I'm doing this in my template to see if there's a floor ...