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

learn more… | top users | synonyms

0
votes
0answers
14 views

Assets folder conditional for dropdown menu

First time using Assets, but just need to know the best way to present the folders/subfolders as part of a menu with a dropdown. So some menu items (folders) have a dropdown and some dont. All i want ...
0
votes
1answer
15 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
19 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
25 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 ...
0
votes
1answer
19 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
20 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, ...
0
votes
0answers
16 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
23 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
35 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
48 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
41 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
25 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
20 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
38 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
42 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
9 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
19 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
46 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 ...
0
votes
1answer
17 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
32 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
18 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
34 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
31 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
26 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
34 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
30 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 ...
0
votes
1answer
46 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
85 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
0answers
14 views

Conditional for grid / file - thinks file exists after having been removed

I am using a conditional to display a snippet whether a file has been uploaded to a grid field - mentioned here: Grid conditional for a file(s) - If file exists display content (file) {if files} ...
0
votes
2answers
42 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
39 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
66 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
56 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
52 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
31 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 ...
0
votes
1answer
32 views

conditional to evaluate structure (url) field and current_url

I'm trying to create a conditional to determine if the structure entry url is the same as the global {current_url}. I created a structure field called, {product_category}. For some reason I cannot get ...
0
votes
2answers
25 views

Search module giving incorrect links

I'm setting up a search feature on a site and one of the channels that it's searching is downloads. Rather than link all download results to the downloads page using the {auto_path} tag and then ...
0
votes
0answers
70 views

Relationships and conditional problems

I have a Facilities channel and a Jobs channel. The Facilities entries have multiple fields with facility info. The Jobs channel has a title field and a relationship field that allows a user to select ...
1
vote
2answers
58 views

Simple Conditional Help

Simple question here hopefully. I have an album page that displays a track listing. With the option for up to 4 discs being displayed as show below. DISC 1 Track listing DISC 2 Track listing ...
1
vote
0answers
36 views

Using session_variables and conditionals with Matrix!

The Situation: I'm building a new feature for a wildlife-based charity. They want to spice up their donation form to include images of relevant animals based on how users have been browsing the site. ...
2
votes
1answer
117 views

Conditionals from within Piped String of values

I have a string of piped category ID's which represent all the categories which are selected for any given page. Within my page, I now need to check the input of the chosen categories. For example, ...
0
votes
1answer
21 views

Check existance of layout variable?

Is it possible to do something like the following (which doesn't work). {if layout:contents} {layout:contents} {if:else} 404! {/if} thanks! :: ed
0
votes
0answers
25 views

Basing a conditional on Grid's next_row

I've got a grid field that contains a field (column) called 'flagfield'. I'm trying to find a way to have a conditional inside the main Grid loop based on the value of flagfield in the next row. ...
1
vote
2answers
78 views

If statement based on length of Channel Field

Is it possible to create an {if} statement based on the character length of a channel field? Something along the lines of this: Lets say I have the channel field - {title} and I want to add a class ...
0
votes
3answers
86 views

Using conditional for displaying special content to specific entry

Trying to display different link for one entry (thing1) inside channel entries loop. {exp:channel:entries channel=“things”} <h2>{title}</h2> <p>{description}</p> ...
1
vote
1answer
28 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: ...
1
vote
1answer
143 views

“Invalid Conditional” error if relationship :count is 0 in conditional?

I'm getting an error if my relationship field does not have any related entries selected: You have an invalid conditional in your template. Please review your conditionals for an unclosed ...
0
votes
1answer
40 views

Conditional statement issues

EE v2.4.0 (Updating is not an option at this time) Hello! The photo gallery that we use still shows up even when no photos are added. Basically what I'm trying to do is get the image gallery to show ...
0
votes
1answer
42 views

Evaluate two conditionals for content

I have a page where I want to display either a featured image or an image gallery in the left corner of a text block, which wraps around the image. Pretty basic. If I use just a single image for the ...
0
votes
2answers
36 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 ...