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

learn more… | top users | synonyms

0
votes
0answers
16 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
0answers
9 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
13 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
23 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
7 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
17 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
13 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
11 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
34 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 ...
0
votes
2answers
55 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
17 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
43 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
25 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
21 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
108 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
55 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
43 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
40 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
55 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
36 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
22 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
41 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
36 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
29 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
26 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
71 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
53 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
39 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
49 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
46 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
14 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 ...
0
votes
3answers
72 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}" ...
2
votes
1answer
50 views

custom field not blank conditional issue

I've created the following conditional which is displaying 0 content: {exp:channel:entries channel="patterns" orderby="title" status="pending|camera-ready|closed|open"} {if oldnotes != "" } ...
0
votes
1answer
44 views

If {there is no image} OR {if there is no expert} then use a certain image

Here in this code I am finding a feed expert and then producing his avatar. Conditions are needed to control the conditions of this avatar output. So this is what must happen: firstly if there is a ...
0
votes
3answers
46 views

using URL parmater with conditional

Inside this URL there is a parameter: http://localhost/recipe?id=9 Is it possible to use this parameter (id=9) with a conditional, like a segment? Or to check if there is a parameter inside a URL ...
1
vote
1answer
40 views

Simple conditional to compare expiration and entry date failing to evaluate

I'm trying to code more readable dates on posts which have been entered. It will read "12 - 17 Jan" but if the month is across two months it will read "12 Jan - 2 Feb" Spitting out my dates like so ...
1
vote
2answers
84 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"> ...
1
vote
3answers
24 views

detect data is coming from which channel?

{exp:channel:entries channel="schedule_action | schedule_sports | schedule_hd" } //how do i detect channel here.I need to use a if condition. {/exp:channel:entries} ...
0
votes
1answer
95 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
78 views

If custom channel field entry exists display content else display alternate content

I am trying to set up a slider in ExpressionEngine which will display a video if the video embed code exists, otherwise it will display an image slider. Currently, I am not able to hide the image ...
1
vote
2answers
77 views

conditional based on what channel the entry selected in a playa field is in?

I have a matrix field that has 1 column, which is a playa field. The playa field is set up to allow the user to choose any open entry within 2 different channels. I need to display code in the ...
0
votes
1answer
34 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 ...
1
vote
1answer
181 views

if last segment equals url title

I am trying to show an active class if an entry is being viewed but my conditional's are not working: {if last_segment == '{url_title'} class="active" {/if} I am using an embed of a list of ...
1
vote
1answer
52 views

How do I use a conditional to display Relationships content?

I am working with three Relationship fields and I would like to be able to display a section only if there are any related articles in that section. I tried this without success: {if related_tips != ...
1
vote
1answer
106 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 ...
0
votes
1answer
37 views

Use conditional to hide or show entry

I would like to use a conditional to hide or show information from an entry. The following code is pulling in data from an EE relationship field. If there is no entry I would like this code NOT to ...
0
votes
1answer
73 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
1answer
45 views

Comparing Stash variable to segment fails

I asked this also on Devotee - apologies for posting in both places but I guess here is better. I’m setting several variables in the Channel Entries loop like so: {exp:stash:set name="var1" ...
3
votes
2answers
169 views

Page Load too Slow

I have a page template that runs exceptionally slow (average 20 seconds to load). These pages are event pages and require certain information to be shown pre-event vs. post event. There are also ...
2
votes
1answer
67 views

Simple conditional statement and parse order problem

I'm fairly new to ExpressionEngine, and I hope the problem I'm running into is a simple one to solve. I'll try to illustrate it as best as possible: I have a radio button field (created within a ...