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

learn more… | top users | synonyms

0
votes
1answer
4 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
27 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
0answers
14 views

Conditional to detect entries with the same values?

I'm trying to write a conditional to detect if there are multiple entries with the same value in a specific field. If there's more than one entry with the same value in this specific field, I'd like ...
0
votes
1answer
16 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
22 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
38 views

no_parents/no_results Using playa entry results based on a url segment, want to display no results

I have a list that builds based on the URL segment. Sometimes there no entries for the segment and need to display "no results". I have tried several varations on this and nothing seems to work. Any ...
0
votes
1answer
18 views

Playa field with the same data

I have a playa field into an entrie for a channel written by teachers. I'd like to prevent when a teacher uploads the same 'link' multiple time in different lessons that the 'link' is NOT shown ...
0
votes
3answers
26 views

Grid Conditionals not working

I'm using a simple grid conditional to show academic references in a post. I only want to show it if someone has entered some references, but the conditional just isn't working. What am I doing wrong? ...
0
votes
1answer
14 views

any conditional causes fatal error

This is probably only partly related to ee and more to do with server setup but I am hoping someone can help. Adding any conditional to my templates results in the following error: Fatal error: Call ...
0
votes
0answers
19 views

How to set a modifier to adjust the price based on quantity ordered

OK - so apologies if this turns out to be a lengthy post, there's a bit to explain! My client sells pens, branded pens with a logo... They have 5 things that affect the end price of each product ...
0
votes
0answers
9 views

Conditional freeform reply if email input contains domain

I'm wanting to know if it is possible to set-up a condition in the automated reply Solspace Freeform email template that sends content "A" if the email address they enter in the corresponding field ...
0
votes
1answer
25 views

If statement failing in with custom field on a specific post with certain value length

A very weird problem, but in a specific channel that has many custom fields I get a very peculiar problem with just one entry (as far as I can tell) where a particular custom field is failing only ...
1
vote
2answers
53 views

How to hide content if channel has no entries?

A found a few questions related to this one. However, the solution they provide is not compatible with my situation. How do I hide a div when the channel entries tag it contains has no results? ...
0
votes
1answer
15 views

Error after EE2.9 update. Conditional fix required

The below code no longer works with EE2.9 Have tried determining how to change it but cannot work it out. I just need to specify that if ANY of the fields exist, display the content ...
0
votes
1answer
32 views

Conditional to check if a field exists for a channel

Is there a way to check if a field with a certain short name exists for a given channel? I'm not checking if a field is left blank, but if it even exists in the field group. Currently, this only ...
0
votes
1answer
45 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'"} ...
0
votes
0answers
37 views

Solspace Freeform Pro Conditional Fields

I'd like a user to select a method of payment, and based on their selection, have 2 things happen. Show text field "member_number" and on Submit send user to a specific page. Show text field ...
0
votes
1answer
16 views

Categories not selected correctly with if statements

Currently I'm trying to use if statements to determine what category to filter on. I'm using a combination of freebie and embed. However, I can't seem to find the right syntax to filter correctly. I ...
1
vote
0answers
68 views

Outputting a relationship field inside a grid field

So I have a grid field with two columns, one of which is a Wygwam field, the other a relationship field. I want to list all the rows in the grid, outputting the Wygwam field as the text, and ...
0
votes
2answers
67 views

Stash, Conditionals, and a Custom Field

New to Stash and here is what I'm trying to accomplish. But so far, no such luck. I have two templates - manage-social-media.html and .layout-account.html Manage-social-media.html Here I am ...
0
votes
1answer
47 views

If statement not working using a nested relationship field

I am having a bit of trouble with a relationshop field nested inside a grid. I have the following data structure. |-Products |--product_where_to_buy (relationship field for partners) |-Partners ...
0
votes
1answer
18 views

ExpressionEngine Conditionals if:elseif

I'm having trouble getting a condition to evaluate properly: http://goo.gl/wWkw4E. Here's what I'm trying to achieve: If an image has been uploaded, show image 1 If no image has been uploaded but ...
0
votes
1answer
63 views

Conditional on Assets Field Tag that contains a quote in EE v2.9

Running up against a problem in the use of an Assets field tag in a conditional where there's single quotes entered into the field (in this case the Caption field). Caption: Otherwise know as 'Old ...
0
votes
1answer
25 views

P&T Fieldpack:Checkbox - Spitting out if conditional instead of parsing it

I am running into a problem with the fieldpack checkbox on a site I am developing. I am using the following code inside an {exp:channel:entries} loop, but the first two entries is echoing out the if ...
0
votes
2answers
19 views

Conditional based on file extension

I have a piece of code whereby I adjust the output of a file depending on it's file extension: {section_1_files} {section_1_files:file} {if {extension} == 'jpg|JPG|jpeg|JPEG|png|PNG|gif|GIF'} ...
0
votes
1answer
40 views

CartThrob {if error:your_field} conditional not working for item_options

Trying to use CartThrobs Inline Errors within a add_to_cart_form to validate a simple form with two fields. For the price field, the validation works, but for the item_options[invoice_number] it does ...
0
votes
1answer
32 views

Conditional Examination of Dates within a Matrix Field

We are utilizing a Matrix field to list information by date (each day has it's own row - first column being "date". We want only today's row to be displayed (similar to a calendar). HOWEVER, if an ...
0
votes
1answer
72 views

Forcing Preload-Replace variables to parse before conditionals in 2.9.0

I've been using Low's technique of combining snippets and preload variables (as described here) in order to be able to use a particular snippet repeatedly (and DRYly). The snippet contains ...
1
vote
2answers
89 views

Matrix Total Rows Column Search Conditional

So I have this conditional that works properly for entries with matrix rows: {if {tech_documents:total_rows search:doc_thumb="IS_EMPTY"} > 0} ... {if:else} ... {/if} However, entries ...
0
votes
2answers
34 views

Contains operator not working for channel field that uses checkboxes

I am using a checkbox channel field named "destinations" that allows an entry to have multiple values checked off. I then want other fields from that entry to be displayed if the destinations field ...
1
vote
1answer
62 views

Upgraded to EE2.9, CartThrob Pro2.6 now add to cart tag with inventory conditional isn't working

I'm using ExpressionEngine2.9 and CartThrob2.6. I Upgraded versions from EE2.6.1 and CT Pro2.3.5 The store was working previous to updating EE/addon, I updated a dev version of the site. After ...
0
votes
1answer
30 views

Is still necessary using the Add-on Ifelse from Mark Croxton with EE2.9?

In the new EE version (2.9), the conditionals evaluate when ready, so the performances are boosted. Is still necessary using the IfElse Add-on from Mark Croxton, when using EE conditional?
0
votes
1answer
37 views

Checking for custom field with conditional inside of an embed template

I've decided to just test an idea for custom meta tags on every page without using Low Variable and try a native approach. The idea is to use an embed template with embed variables to check if a ...
0
votes
4answers
160 views

{if logged_in} not working?

My frontend has a sidebar that is embedded by most of my frontend's pages. In that sidebar template, there is a conditional that goes something like this: {if logged_in} ... ... ...
0
votes
1answer
70 views

PHP string fun does not evaluate unless var is used elsewhere in template

I'm trying to use the PHP String fun plug-in to evaluate whether a current entry belongs to a specific channel and then show/hide a register prompt depending upon that. So I have a snippet: ...
1
vote
1answer
72 views

Conditional to show entry by date range?

Have an instance where there are two entries - one needs to be shown for six months of the year and the other for the second six months.... looking at a conditional which essentially says: if ...
0
votes
1answer
103 views

If category id = x AND if there is an entry then display

I have a list of images in 4 different categories that I want to display on a search results page. My logic is that the pictures are to be displayed under 2 conditions, 1 - it is in its respective ...
2
votes
3answers
64 views

Advanced Conditions: {if:else} tag not getting read

So, I think I've caught on that advanced conditions and EE tags don't play like expected. So, I downloaded Mark C's "IfElse" plugin and things are looking up. However, my default condition, ...
1
vote
3answers
43 views

Conditionals within Categories

I'm attempting to get a conditional statement working within category id parameters. Ideally, I need the title of certain entries to link to details pages but ONLY if they are in category_id 38. ...
0
votes
1answer
29 views

Check if product(s) are in cart of a specific category

I am looking for a way to check if certain products of a specific category are in cart and then based on that hide a specific payment method. I have found this thread which deals with basically the ...
0
votes
1answer
64 views

Wygwam inside of a grid — has_excerpt conditional not working

I'm unable to test for the has_excerpt condition, when trying to display excerpt and extended content in a grid. In this example, "booklist" is a grid field and book is a wygwam field within that ...
0
votes
0answers
63 views

PHP error when relationship parents field is empty

I have a template set up to pull in parent entries using the relationship fields, which works great, unless there is no related parent entry. If there is no related parent for the current entry, I ...
0
votes
1answer
32 views

Test for empty string

I have this code to see if member_order_comments is blank or not. {if '{member_order_comments}' != ''} It works fine, unless there is a ' in the middle of member_order_comments, in which case I get ...
0
votes
1answer
29 views

Conditionally targeting the 404 template

When I get a 404 page, the URL in the browser remains pointing to the page I was trying to reach. ie. the address bar will show domain.com/unreachable-page not domain.com/404. Which is fine and, I ...
2
votes
1answer
79 views

EE 2.8.1 relationships change

I had {parents channel="gallery"} {if parents:no_results}Galleries: 0</a>{/if} {if count >= 1} {if count == total_results} Galleries: <a ...
0
votes
1answer
78 views

If statements using OR and Matrix fields

I have a Matrix field that includes three options. The aim is to output a <select> element if one or more of these options is selected. (These fields are Pixel & Tonic Field Pack ...
0
votes
1answer
47 views

Weird If statement behaviour inside channel:form

I'm building a page containing a channel form to allow users to edit their posts, and I thought I'd add an {if}...{/if} statement to prevent them editing other users' entries. The permissions on the ...
0
votes
2answers
56 views

Trouble with Conditional inside Matrix Field

I'm trying to setup a conditional to only show the Start Date when the Start Date and End Date match, but I can't get it to work in Matrix and I can't find a similar question anywhere. Here's what I ...
0
votes
1answer
50 views

Playa in a Low Variable and Stash problems after Update to latest stable Stash version

I had this scenario working before: A Stash "standard.hmtl" template with {exp:stash:get name="maincontent"} A single-view template for products that looks like this: {!-- set the page layout --} ...
0
votes
1answer
15 views

Frontend public message with close or hide button

I'm looking for a way to display entries from a channel as a message on the homepage that are able to be hidden once the visitor has read it. Anyone know of a simple way to achieve this or an add-on ...