7 votes
Accepted

Conditional with variable gives php error

The problem with that is that if {parent_id} doesn't get replaced with a number before the conditional is evaluated, then EE will choke because when converted to PHP it becomes: if ({parent_id} == 0)...
user avatar
  • 5,234
4 votes
Accepted

Dynamically setting case value with switchee

While you could easily use Stash to pass the entry ids as a variable, you shouldn't. To create the variable would mean iterating over the entire list of entries in a channel. That's expensive just ...
user avatar
  • 5,234
2 votes
Accepted

Pass first level categories to switchee case value

With Stash: {exp:stash:set name="categories" parse_tags="yes"}{exp:gwcode_categories channel="products" depth="1" style="linear" backspace="1"}{cat_name}|{/exp:gwcode_categories}{/exp:stash:set} {...
user avatar
  • 5,234
1 vote
Accepted

Stash & Switchee parse order problems

It looks like you're simply testing to see if the nested entries are empty or not. Could you not use something like: {exp:stash:get_list name="buy_now_options" parse_tags="yes" parse_conditionals="...
user avatar
  • 3,163
1 vote

Switchee regex for numbers

You just need to set the parse parameter to inward if you want to discard the content of the unmatched cases before parsing them or you are using a module or plugin tag as a parameter. The RegEx you'...
user avatar
  • 6,108
1 vote
Accepted

Blank page output when using Entry Status in nested Switchee statement

As @checyney said there is no channel:entries loop yet. I'd suggest you do it something like this: {case default="Yes"} {exp:channel:entries} {switchee variable="{status}" parse="inward"} ...
user avatar
1 vote

How to use Swtichee and/or Low Variables to optimise an if if:elseif if:else conditional statement

Frankly, ExpressionEngine code conditions to convert in switchee or law variables will not increase page speed. To enhance the performance, you should try this plugin for if condition:(EE2) URL To ...
user avatar
1 vote

Low Seg2Cat and MixItUp

In short: no. Low Seg2Cat looks at full segments, which in your example is order#cakes, not order, nor cakes. Your better bet is to, rather than use a hash in your URL to indicate a filter, simply ...
user avatar
  • 17.4k
1 vote

Slow loading, multiple conditionals from multiple channels + sorting solution?

You could achieve this with Low Search, the Field Search filter and enabling smart_field_search. That will apply the search:field parameters only to the channels the field is assigned to. {exp:...
user avatar
  • 11.3k
1 vote

Slow loading, multiple conditionals from multiple channels + sorting solution?

Without going to a custom query you could try one master exp:channel:entries tag like: {exp:channel:entries channel="fprod|brod|drod|etc" disable="category_fields|member_data|pagination|trackbacks" ...
user avatar
  • 3,163
1 vote

Pass first level categories to switchee case value

parse="inward" is the villain here. Switchee is being parsed before the exp:gwcode_categories. Since I believe you need the parameter, your option is to force exp:gwcode_categories to be parsed early....
user avatar
  • 6,108
1 vote
Accepted

Issue with many relationship fields in a channel

Lets tidy this up: {exp:stash:set name="home_page_blocks" parse_tags="yes" trim="yes"}//Trim removes whitespace {exp:channel:entries channel="pages" backspace="1"} // Remove last '|' {...
user avatar
  • 3,163

Only top scored, non community-wiki answers of a minimum length are eligible