Questions tagged [conditionals]
For questions that use logic to display or hide parts of a page/template
31
questions with no upvoted or accepted answers
1
vote
1
answer
166
views
conditional statement with radio button value
I'm not sure if this is an EE bug or if I'm doing something wrong. I'm looping through my "tournaments" channel entries and for each entry I'm looping through a "teams" channel that has a ...
1
vote
3
answers
168
views
Setting a Stash variable within an old style EE conditional
I'm working on an old EE site (v2.5.2) which for reasons I won't go into I cannot update to a newer version.
I am trying to set a Stash variable based on whether or not a condition evaluates to true. ...
1
vote
2
answers
66
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}
{redirect=...
1
vote
0
answers
61
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. ...
1
vote
0
answers
256
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 ...
1
vote
1
answer
130
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 ...
1
vote
2
answers
216
views
Can't get my conditional to work inside a Playa field
I want to insert a simple exception, using an "if" statement, into the flow of my Playa field's output. But it's not working. Can I get help?
Here's the code that works:
{prac_area_contact_people ...
0
votes
3
answers
61
views
Template variables conditions
Im on Expression engine 7 now.
Im trying check template variable for condition. like so:
{if site_logo_path != ""}
<img src="{site_logo_path}">
{if:else}
<h1>...
0
votes
1
answer
9
views
Possible to match conditional from multiple values?
I'm trying to display relationship field "members" from selected "events" if their "field" value matches a certain "query":
{ev_members status="open|other&...
0
votes
1
answer
43
views
IF conditional not working with Relationship fields in Fluids
When using a Relationship field with a Fluid field type the current_field_name variable can be printed out for debugging just fine, but IF conditionals don't work when using current_field_name.
{exp:...
0
votes
3
answers
25
views
Display different content if the base-domain contains ".uk" or ".co"
{exp:channel:entries
channel="homepage_banner"
orderby="{ban_strt_date}"
sort="asc"
status="open"
limit="5"
url-title="{site_url}"}
{if url-title *= ".uk"}
<div ...
0
votes
1
answer
33
views
{order_total} conditional {if order_total > 100}
I want to offer manual payment option only if cart total amount is above 100,00 but {if order_total > 100} doesnt seem to work.
Any sugestions anyone?
0
votes
1
answer
129
views
Conditional with categories
So I'm trying to conditionally display an embed within an entry based on several parameters: channel_short_name and category. So I have a conditional that checks a few items and then if it matches has ...
0
votes
2
answers
61
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
3
answers
61
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
1
answer
96
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
2
answers
137
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
1
answer
77
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
2
answers
110
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 ...
0
votes
1
answer
62
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
2
answers
82
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
2
answers
101
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
2
answers
40
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
0
answers
339
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 ...
0
votes
3
answers
179
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>
...
0
votes
1
answer
56
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 ...
0
votes
1
answer
68
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
1
answer
434
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
1
answer
159
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 grid:...
0
votes
0
answers
165
views
Playa's {myfield:total_children} and conditionals (checking for "no results")?
We are using EE 2.5.5 and Playa 4.4.2.
We are setting the "status" field dynamically on our site. We need to be able to use Playa like so:
{if {myfield:total_children status="{embed:status}"}}{/if}
...
0
votes
1
answer
126
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
|--...