# Question
Title: 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}

```

...but I get this error:

```
You have an invalid conditional in your template. Please review your conditionals for an unclosed string, invalid operators, a missing }, or a missing {/if}.

Parser State: Unexpected ‘}” == “{exhibition_e…’ (STRING); expected RD in Template “XXXXXX/exhibitions” on line 25.

```

I can't find anything in EE's documentation indicating a special way to check for snippets. Any ideas?

# Answer
> 0 votes
Start by creating a simple conditional with no EE tags in it, so you can identify if the erronious `}` is in the snippet or in the way the advanced confditional is bein parsed. For me I'd be inclined to lose the advanced conditional and make it simple too, for testing.

```
{if '{snip-start-to-end-dates}' == ""}Long-term Installation{/if}
{if '{snip-start-to-end-dates}' != ""}{snip-start-to-end-dates}{/if}

```

Ugly but simplifies the conditional. I would wager the issue is in the tags in your snippet though! Your code snippet in the OP looks ok.

Of course if you look to the EE Parse Order you'll notice that snippets are replaced on the template first, whereas what you seem to be doing is trying to measure the **result of the snippet**. For example assume I had this snippet :

```
{if '{segement_1}' == 'someseg' && '{segemnt_2}' != ''}
  {if group_id == 6}
    <p>Welcome User!</p>
  {/if}
{/if}

```

If I re-inact what happens on your conditional I get this :

```
{if '{if '{segement_1}' == 'someseg' && '{segemnt_2}' != ''}{if group_id == 6}<p>Welcome User!</p>{/if}{/if}' != ""}
  {if '{segement_1}' == 'someseg' && '{segemnt_2}' != ''}
    {if group_id == 6}
      <p>Welcome User!</p>
    {/if}
  {/if}
{if:else}
  Long-term Installation
{/if}

```

Woah! that got messy, note how the snippet within the quotes in the conditional is replaced as text? You're asking for trouble parsing this! Just look at the first part of the conditional now, in short you've got quote and curly brace madness happening within the if conditional.

You're best off not using a snippet and making sure your snippet returns "Long-term Installation" instead of nothing so you can just include it.

```
{snip-start-to-end-dates}

```

But to answer the question specifically, to check if a snippet exists and has characters within it you're right :

```
{if '{snip-start-to-end-dates}' != ""} ... {/if}

```

**Edit 1** : Of course, *there is another* (way)

Here's a little trick that might just help you evaluate the **result** of the snippet as opposed to the content, you'll need to use PHP and 'borrow' EE's Template parser...

The usual wanring, danger, thar be pirates! PHp and messing iwth the Template parser can quickly ge you into a 'WAT' Situation (this is well worth a watch btw, good for a chuckle), though I have tested this code with my own snippet, with a conditional in it!

```
<?php
  //you need to fool EE here, by making the snippet string with a
  //PHP concat it's not picked up as a parsabel too early'
  $snipTest = '{' . 'test_snip}';

  //this will parse the $test string as if it where a template, and parse the snippet globals created within
  ee()->TMPL->parse($snipTest );
  $snipTest = ee()->TMPL->parse_globals($snipTest);

  //test the string, the string is the result of the evaluated template, not the snippet contents!!
  if ( strlen($snipTest) > 0 ) { echo $snipTest; } else { echo "Long-term Installation"; }
?>

```

---
Tags: conditionals, snippets
---


# Question
Title: Low Search results not showing all entries from a category
I have a search form composed of category select fields. When choosing a particular category (2 Bedroom / 2 Bath) the results page isn't showing all entries. But, when viewing the "all floor plans" page and selecting "Two Bedrooms" I can see every entry.

Any ideas on why the Low Search form wouldn't be showing every entry from a selected category? The form seems to work, as it shows *some* of the entries, but why wouldn't it show *all* entries?

Here's the search form where you can select the 2 Bedroom / 2 Bath option under "Number of bedrooms?":

http://l45living.com/floor-plans

Here's the page listing all "Two Bedrooms" entries:

http://l45living.com/floor-plans/all/two-bedrooms

Notice how there are many more entries displayed on the "all/two-bedrooms" page. Template code (edited for brevity):

```
{exp:low_search:form
  form_id="floor-plan-search"
  query="{freebie_3}"
  result_page="/floor-plans/search#floor-plans"
}
  <select name="category[]">
    <option value="">Show me all the options!</option>
    {exp:channel:categories
      category_group="1"
      show="not 4"
      style="linear"
    }
      <option value="{category_id}"{if low_search_category ~ '/\b'.category_id.'\b/'} selected{/if}>
        {category_name}
      </option>
    {/exp:channel:categories}
  </select>
{/exp:low_search:form}

{exp:low_search:results
  channel="units"
  orderby="title"
  query="{freebie_3}"
  require_all="category"
  sort="asc"
}
  ...results shown here...
{/exp:low_search:results}

```

# Answer
The URI `/floor-plans/all/two-bedrooms` doesn't look like a Low Search query, and therefore the Results tag won't filter entries. It's looking like it works as designed. This URL does seem to be showing the results you'd expect.

**Edit** Turns out there was another category selected so the form would filter by *both* categories rather than the one. Removing the other one solved the issue.
> 0 votes

---
Tags: low-search
---


# Question
Title: getting the Matrix rows of a Playa entry
I have the following Stash variable list to get the related author of an article

```
{exp:stash:set_list name="my_list" parse_tags="yes" parse_depth="2"}
    {exp:playa:children var_prefix="children" entry_id="{entry_id}"}

        {stash:author_name}{children:title}{/stash:author_name}
        {stash:author_bio}{children:profile_bio}{/stash:author_bio}
        {stash:item_entry_id}{children:entry_id}{/stash:item_entry_id}

    {exp:stash:set_list:nested name="related_entries" context="{children:entry_id}" parse_tags="yes"}
        {!-- Matrix tag pair --}
        {profile_social_media}
            {stash:related_title}{url}{/stash:related_title}
        {/profile_social_media}
    {/exp:stash:set_list:nested}

    {/exp:playa:children}
{/exp:stash:set_list}

```

but struggling to then get the social media profiles contained within a Matrix field for that related author.

Then in the wrapper we have

```
 {exp:stash:get_list name="my_list"}
    <div class="{switch='row|rowAlt'}">
        <h1>{author_name} (item {count} of {absolute_results})</h1>

    {author_bio}

    {exp:stash:get_list:nested name="related_entries" context="{item_entry_id}" prefix="nested"}
            <div class="{nested:switch='row|rowAlt'}">
                {related_title} (Related item {nested:count} of {nested:absolute_results})
            </div>
        {/exp:stash:get_list:nested}

    </div>
{/exp:stash:get_list}

```

Author name and bio are fine, just not the Matrix rows.

# Answer
So my Stash logic here was correct in so much that it was setting the var correctly, but the `var_prefix` was where the setting of the var was failing.

So the `set_list:nested` should have been like:

```
{exp:stash:set_list:nested name="related_entries" context="{children:entry_id}" parse_tags="yes"}
  {!-- Matrix tag pair --}
  {children:profile_social_media}
    {stash:related_title}{children:url}{/stash:related_title}
  {/children:profile_social_media}
{/exp:stash:set_list:nested}

```
> 0 votes

---
Tags: matrix, playa, stash
---


title: Freeform validate radio button

text:
# Question
Title: Freeform validate radio button
I have a form with two yes/no radio buttons. Is it possible to create a validation for Freeform if the 'No' option is selected?

# Answer
> 0 votes
If you have a group of 2 radio buttons for Yes/No, as long as both radios have a value (lets say "on" and "off") then you can make the radio button required. Make sure the radios have the correct `name` attribute.

If the radio is in fact 1 radio button with on = yes off = no, then you'll have to add a hidden input with the no value in it, so that when the form is submitted there is at least a value for the named post variable.

---
Tags: solspace-freeform
---


# Question
Title: layout:contents not showing up in nested template
I have three templates, simplified here for your digestion:

First One:

```
{layout="giving/.giving_meta"}

                        <div class="row">
                            <div class="col-md-4">
                                <h4>Guide To Giving</h4>
                                <p>Integer lacinia sollicitudin massa. Cras metus. Sed aliquet risus a tortor. Integer id quam. Morbi mi. Quisque nisl felis, venenatis tristique, dignissim in, ultrices sit amet, augue. Proin sodales libero eget ante. Nulla quam. Aenean laoreet. Vestibulum nisi lectus, commodo ac, facilisis ac, ultricies eu, pede. Ut orci risus, accumsan porttitor, cursus quis, aliquet eget, justo. </p>
                            </div>
                            <div class="col-md-4">
                                <h4>Greatest Needs</h4>
                                <p>Integer lacinia sollicitudin massa. Cras metus. Sed aliquet risus a tortor. Integer id quam. Morbi mi. Quisque nisl felis, venenatis tristique, dignissim in, ultrices sit amet, augue. Proin sodales libero eget ante. Nulla quam. Aenean laoreet. Vestibulum nisi lectus, commodo ac, facilisis ac, ultricies eu, pede. Ut orci risus, accumsan porttitor, cursus quis, aliquet eget, justo. </p>
                            </div>
                            <div class="col-md-4">
                                <h4>Impact</h4>
                                <p>Integer lacinia sollicitudin massa. Cras metus. Sed aliquet risus a tortor. Integer id quam. Morbi mi. Quisque nisl felis, venenatis tristique, dignissim in, ultrices sit amet, augue. Proin sodales libero eget ante. Nulla quam. Aenean laoreet. Vestibulum nisi lectus, commodo ac, facilisis ac, ultricies eu, pede. Ut orci risus, accumsan porttitor, cursus quis, aliquet eget, justo. </p>
                            </div>
                        </div>

```

Onward, I have .giving\_meta:

```
{layout="master_templates/.backpage}
     {layout:set name="title"}MyTitle{/layout:set}
        {layout:set name="department"}Department{/layout:set}

```

Finally my .backpage template (again, abridged for utility):

```
<a bunch of html>
{layout:contents}
<more HTML and stuff, the end>

```

{layout:contents} is not making it to the third and final template. It arrives just fine if I point the first template to .backpage directly, but otherwise it's a no show. Any ideas? I'm on EE 2.9.2.

# Answer
I'm not sure, because I never tried to use nested layout templates, but I believe that `{layout:contents}` have its value set on every template. So, the second one needs to be:

```
{layout="master_templates/.backpage}
{layout:set name="title"}MyTitle{/layout:set}
{layout:set name="department"}Department{/layout:set}
{layout:contents}

```

Specially for a matter of performance, I recommend you to limit the number of layouts and embeds to a minimum. I can't even imagine a reason for what you're doing. You could have set the meta on the first one.
> 0 votes

---
Tags: template-partials, template-layouts
---


# Question
Title: Manage update_cart and empty_cart in expresso store using transcribe
I'm using Transcribe v1.6.1 and Expresso Store v2.4.1 (EE v 2.9.2) I'm using the empty\_cart and update\_cart inputs in one of my templates. These work fine for the default English language but when translated they cause the page to redirect to the English language version. I noticed that even though I have set my next parameter in {exp:store:checkout} on looking at the html output there is an input named RET which has the English url in it.

```
<input type="hidden" value="de/zur-kasse-gehen" name="return_url">
<input type="hidden" value="de/zur-kasse-gehen" name="next_url">
<input type="hidden" value="23" name="ACT">
<input type="hidden" value="checkout/basket" name="RET">
<input type="hidden" value="6" name="site_id">
<input type="hidden" value="2b4ace44ef575d89250020c6306c639ed284ae98" name="csrf_token">
<input type="hidden" value="CyYLdVppBWNaeQduVw4LbwhiCjAEdlooUiFTPQAqBGUBbFx3BD8BIwM9Xm0GIVMzUXoOZQNrC3hTNA45VXYKJ1UmATsJZAZ5BXMJclQ4XHELOQsyWlMFI1pxB3ZXIwshCGUKMAR2WihSZlMqAG8EZgFrXGAEPAEsA3leIAYhUz9RdA5/A3cLYlN3Dm9VdgpvVWEBCQkuBnsFcgkiVC9cOAs8CyRafAVpWiYHZFc0C2QIawo/BCdad1IhU3QAbQRgAXZcdwQ3AVEDNF5hBidTM1FvDmQDJws2U3cOLFUxCnhVJgF5CSMGcgViCTNUd1whCzgLCFp9BWlafwd2VyMLYggsCmsEJ1oiUmZTdAAqBC8BIVxgBDwBbQMnXnsGI1MuUWUObgNaC3xTNA4nVTUKZlV3AXcJOwYwBXo=" name="_params">
<input type="hidden" value="1" name="secure_return">

```

Does anyone know how to get this to play nicely with Transcribe?

# Answer
The folks at DevDemon have sent me an updated version of the script and now the update\_cart function works correctly. I've asked if they could also fix the empty\_cart function.
> 0 votes

---
Tags: expresso-store, transcribe
---


# Question
Title: Embedding snippets or templates from wysiwyg?
I have a snippet (can be template if necessary) which contains a diagram as code. Is there anyway to make this selectable from the edit entry screen, and preferably associated with a wysiwyg (Expresso) field?

In an ideal world there would be a dropdown populated with the diagram names (can be manually populated) and when you select one it would drop in the snippet code.

Does anyone know if this is possible? Or even an alternative method to achieved this?

# Answer
I'm not so sure on the Expresso Editor, but if you are using WYGWAM as your WYSIWYG editor... If this is the case this might be of some interest to you : https://github.com/pixelandtonic/wygwam\_template\_links never used it so not quite sure if it's exactly what you want...

Also see this article which may give you clues on how tyou could hijack the Template button in WYGWAM to serve embeds/snippets...

If all you wanted to do was perhaps enable the `{embed}` and snippet tags in your WYGWAM you can do this by wrapping the output in `{exp:allow_eecode embed="y"}` tags with the Allow EE Code plugin (seems Wyvern allows this too https://devot-ee.com/add-ons/support/wyvern/viewthread/2357)

Finally, if you wanted a bit more control, how about using Template & Snippet Select with a special marker in WYGWAM/Wyvern (yuo may need to mod/roll your own extension)
> 1 votes

---
Tags: snippets, wysiwyg, ckeditor
---


# Question
Title: DevDemon Forms Email Route - Act as email switch and form feature switch?
I'm using the latest version of EE and DevDemon Forms. We have a form that works well. Our first field is an Email Route dropdown. This works as expected and sends an email to the correct person depending what is chosen.

We would like to use this same Email Route field for conditional logic as well. When we enable conditional logic on a field further down in the form, the Email Route field appears in the possible fields to use, however, no matter what we enter for "value", the condition is never met. We've tried to enter the label and the value from the Email Route field, but nothing seems to work.

Is there a way to use Email Route as both a route selector and as a conditional switch?

# Answer
> 1 votes
The problem is the values in the html.

The email route field doesn't use the actual email as the values.

If you use the actual values from the HTML it will work.

# Answer
> 0 votes
You can't do that without some tricky work. Instead use a regular dropdown and use the emails as values. Then on your email template set your to: email address as that field with {field:my\_email\_drop\_list} and it will send to that person.

As Manuel said it is possible but with the first method an admin would need to know how to inspect the page and connect them. Just depends on who is managing the form.

Brad

---
Tags: devdemon-forms
---


title: Error Message After Forum Install

text:
# Question
Title: Error Message After Forum Install
Has anyone seen this error while going to browse their EE forum. I just downloaded the latest EE Forum 3.1.19 and I am running EE 2.9.3. The issue is this message.

Fatal error: Call to undefined method EE\_Messages::can\_send\_pm() in /home/mysite/public\_html/system/expressionengine/modules/forum/mod.forum.php on line 1215

Is this a known bug? How to work around it.

# Answer
> 1 votes
Just had exactly the same issue.

The {if pm\_enabled} {/if} conditional was only added in 2.10.0 which is causing the error.

https://ellislab.com/expressionengine/user-guide/about/changelog.html#version-2-10-0

Upgrading EE to the latest fixes the issue.

# Answer
> 0 votes
Could be a themes files problems. Did you put inside the EE themes folder the EE forum\_themes folder??

---
Tags: forum, discussion
---


# Question
Title: Freeform entries show users submitted entry
How do I show a users submitted entry using Freeform entries? For example I need to show an immediate response to a users form submission on a return page. ie:

```
            {exp:freeform:entries
                form_name="apply"
                orderby="entry_date"
                sort="desc"
                limit="1"
                status="pending"
            }

               {if '{freeform:field:age-range}'=="Yes" AND '{freeform:field:health}'=="Yes"}Your'e OK{if:else} You're not OK{/if}<br />

            {/exp:freeform:entries}

```

# Answer
> 1 votes
In your FreeForm form tag, you need to set your return parameter to include the entry\_id that gets created when the form is submitted:

```
{exp:freeform:form return="form-success/%%entry_id%%" form_id="1"}
    Form stuff here!
{/exp:freeform:form}

```

And then on your success page, you just grab the entry\_id from whatever segment it ends up as:

```
{exp:freeform:entries entry_id="{segment_2}" form_id="1"}
    Form output here!
{/exp:freeform:entries}

```

---
Tags: solspace-freeform, solspace
---


# Question
Title: Is it possible to limit display of products in the catalog on a per template basis in Brilliant Retail?
In BR's settings, it is possible to limit the number of products displayed in the catalog and paginate the results. However, that seems to set the limit for any and all catalogs referenced throughout the site.

What I'm looking for is a way to limit it per template; for example on the main page, it is a separate template from the 'products' page, and a separate 'catalog'. I want to change the product results shown on the main page to something small, say, four products, while still allowing the products shown on the "products" page, to stay at the default setting of $N.

I looked through the BR docs and 'limit' does not seem to be an optional template variable or parameter. I've tried setting it by using {exp:channel:entries channel="channel-name" limit="4"} but no matter where I place it in the template, it just shows the default product count, set at 8, four times over.

I tried the same without the {exp:brilliant\_retail:catalog} code and it displayed nothing, even though I was specifying the url\_title. I also tried by category ID, I presume I have that info by hovering over the edit link in the BR category settings, I'm not entirely sure. But that did not work either.

Is there a way to do what I'm seeking to do? Maybe I'm just missing something obvious? Thanks.

# Answer
> 1 votes
The BrilliantRetail catalog tag does not currently allow for changing the number of results to pagination per template. For your use case though I would consider a relationship or using the BR product fieldtype to pull specific products on the main page. We generally setup a home page channel for our clients and allow them to select a few 'featured' products for the home page that way.

---
Tags: channel-entries, variable, parameters, brilliantretail
---


# Question
Title: CSRF bug on IE, unable to login to to CP EE 2.9.2
Got a weird one, on this site http://www.limbsandthings.com, Internet Explorer customers (all versions, even 10&11) are unable to search, add to their cart, and login to the control panel. Basically perform any form action without hitting the "This form has expired" CSRF error.

Chrome, Firefox, & Safari users aren't experiencing any issues.

I've tried setting the 'disable\_csrf\_protection' config setting (not ideal)

```
$config['disable_csrf_protection'] = "y";

```

However when that setting is enabled IE users aren't able to login at all (no error message occurs). They are able to perform other form actions.

I've even set a P3P cookie policy in .htaccess, thinking that maybe IE was somehow thinking our session cookie was third party. Setting IE's permission levels to Low doesn't seem to help either.

Another 2.9.2 site I manage for a client, http://www.jerseywatch.com is not experiencing any issues with IE.

**Update**: Viewing the cookies in Chrome vs. IE showed something interesting. The "exp\_csrf\_token" cookie is showing up when I inspect it in Chrome, however IE is reporting that the "exp\_csrf\_token" cookie doesn't exist.

Any ideas?

# Answer
> 0 votes
Thanks to some great help from Blatant we traced it down to the server time. It was about 8 hours behind which was causing IE to set the exp\_csrf\_token to expire earlier than it should. Contacting the hosting provider and getting the server time fixed resolved the issue.

---
Tags: safecracker, login, csrf, ee2.9.2
---


# Question
Title: -exact parameter with custom fields is not working
I cannot get the -exact parameter to work in a search string using Super Search 2.2.3 and EE 2.9.2.

I have a custom field named doctors\_services and I've tried this search query:

```
/search/doctors/search&channel=doctors&doctors_services=Primary%20Care

```

This works - it returns results for Primary Care. **However,** this search also returns other services with "Care" in the name - eg. "Wound Care"

According to the documentation from Solspace (found here: https://solspace.com/docs/super\_search/search\_syntax/#custom\_fields), I should be able to pass an -exact parameter in the string like this:

```
/search/doctors/search&channel=doctors&doctors_services-exact=Primary%20Care

```

**This returns zero results.** Any help on this would be greatly appreciated. I feel like this is a bug?

# Answer
I answered my question. You cannot do exact searches on a Playa field: https://solspace.com/docs/super\_search/third\_party\_support/#pt\_playa
> 1 votes

# Answer
Can you try with a `+` instead of `%20`? Just in case it's an encoding issue here wit hthe exact syntax?

Your parameters look correct, bear in mind also that exact matches the entire field, not just the text supplied, so if you have leading or training characters (even spaces) the loose search will match, the exact one won't...
> 0 votes

---
Tags: solspace, supersearch
---


title: Email Displaying HTML Code

text:
# Question
Title: Email Displaying HTML Code
I am using EE's built-in Mailing List Activation Instructions email to send out an html templated email to users who signs up on the website's newsletter. The email is sending perfectly, but instead of displaying the rendered html template and content, it shows the html code directly onto the email client. Please see below.

It does the same with Gmail. I have set the default email type in the backend as HTML, but does not seem to take effect.

Is there perhaps anything I am missing or doing incorrectly maybe?

# Answer
EE's default system emails -- the ones that use Email Notification Templates -- are always sent as text. There's no code that allows them to be sent as HTML.

See: Auto-Generated Emails Not Being Sent as HTML
> 1 votes

# Answer
Have you tried removing the header (doctype) and footer? So start from

```
<table>

```

to the end of your main

`</table>`

and just that.
> 0 votes

---
Tags: ee2, html-email
---


# Question
Title: Focus Lab Bootstrap config for sub directory?
Ok, I have been using the Focus Lab Bootstrap for a while and its awesome. But I have come across a new problem when trying to use a testing URL that isn't a standard domain/sub.domain.

How would I set up an environment like http://xx.xx.xx.x/test/ ?

Thanks in advance, and let me know if i've left out a pertinent piece of info!

# Answer
> 2 votes
As long as you don't have 2 environments on the same domain, I believe you can override the main `$base_url` and `$base_path` variables separately in each environment config file. So, for example, in `config/config.dev.php`, you'd put this after the `$env_db` variables:

```
$base_url   = $protocol . $_SERVER['HTTP_HOST'] . '/test';
$base_path  = $_SERVER['DOCUMENT_ROOT'] . '/test/';

```

So it loads `config/config.master.php` with the default variables, then it loads `config.dev.php` and updates the base path variables to point to your subdirectory.

I haven't tested this though, just an educated guess.

# Answer
> 0 votes
I had to put this **after** the line in config.master.php that sets $base\_path and $base\_url so it would overwrite those variables if they were passed in from config.local.php.

---
Tags: focus-lab-master-config
---


# Question
Title: ExpressionEngine and Solspace Calendar and Relationship and Custom Event Selection and Grouping by Date
I made a channel with a relationship with calendar and events channel. The relationship with event is multiselect. I want to select the event manually from the backend(channel). Now i am failed to show these event in front end with the grouping by date as shown in the image/attachment.

Please tell me; how can i do such functionalities.

http://www.imageurlhost.com/images/7yje2k0ht07jykhqyajm.png (relationship pic)

http://www.imageurlhost.com/images/c3j2g4poltpz1tv7npi.png (layout pic)

# Answer
> 0 votes
Let's assume, based on the comment about **making sure to use the channels and custom field groups provided by Calendar upon installation**, that the channels and field groups are set up properly.

Since `{exp:calendar:cal}` doesn't load the EE Channel:Entries library, it will likely not parse Channel module-based tags such as Relationship or Playa fields. In this case, you will need to pass the `event_id` from {exp:calendar:cal} into either `{exp:calendar:events}` (which loads the Channel:Entries library), or `{exp:channel:entries channel="calendar_events"}` if you're not using any date-based data. You may or may not need an embed to pass the ID.

---
Tags: relationships, solspace-calendar
---


# Question
Title: Outputting only one of each item within a relationship tag
We're using the relationship field to output the "brand" of items, on the listing page we want to output all of the "brands" so that we can filter by brand, however by default the tag outputs each and every items "brand". We would like to limit it so that it doesn't show the same brand twice, it this possible?

Our current code looks like this:

```
    <ul>
      <li class="all"><a href="#all">All brands</a></li>
      {exp:channel:entries channel="products" category_group="1"}
      <li>
        {product_label}
        <a href="#product_label:url_title">
          {product_label:title}
        </a>
        {/product_label}
      </li>
      {/exp:channel:entries}
    </ul>

```

Any ideas much appreciated!

# Answer
I see 2 options, firstly you might be able to acheive this with Stash, make a list of the product\_label entry id's and check this list as you print out the next one, if its in the list don't print.

The second option is a bit more heavy. We could use a single PHP query to get your list of product label titles, then iterate the products channel as normal, using the PHP query result to control the output of the relationship fields. If you want to go down this route comment and I'll try to find a moment to write an example for you.
> 1 votes

---
Tags: channel-entries, relationships
---


# Question
Title: Publish Channel Form entry with current zoo visitor account set in relationship
I have a Product channel for eCommerce that members can add entries to for sale on the website.

When a member creates the product, I want the Channel Form to set the value of the "Product Member" **relationship field** equal to the member who created it.

I am imagining a syntax similar to how I set the URL Title of a Channel Form entry.

```
<input type="hidden" name="product_member" value="{visitor:global:url_title}" />

```

Does anyone have any suggestions?

**EDIT** I found a solution before the answer posted. But Blatant's troubleshooting steps are correct nevertheless. After outputting the field using `{field:product_farmer}`, I was able to construct my hidden field to publish the new entry with the currently logged in user.

The end result is this syntax:

I noticed that relationship fields, whether they are one-to-many or many-to-many, use the same syntax (i.e. `input type="hidden" name="custom_field_name[data][]" value="{entry_id}"`). Zoo Visitor ID returns the channel entry ID of the currently logged in member.

# Answer
> 1 votes
First things first I would show the relationship field in the channel form using the `fields` variable syntax, this way you can see the source of the control and the value it would be posting.

I expect you'll see a select list with your members in it, and the values will be the member ID.

If this is the case, then you would be able to trick the form with a hidden input like this :

```
<input type="hidden" name="product_member" value="{member_id}" />

```

Note that this is not exactly 'safe' as anyone fwith Firebug for instance could swap the value out! The safer way would be to post process this in some way, most reasonable seems to be to use the `channel-form-submit-entry-start` event and incert the logged in Member ID.

---
Tags: expresso-store, safecracker, relationships
---


title: Infinite scroll within conditional

text:
# Question
Title: Infinite scroll within conditional
I have Derek Hogue's solution to infinite scroll working, with magicspon's fix for the issue of preventDefault being ignored: Infinite scroll and pagination on ee?? Anyone has this working?

This works great until I encapsulate the markup in IF conditionals, whereby the results don't update. I have tried early parsing using IfElse, but this has no effect. Why might this be?

Here's the full working test template:

```
{embed="embeds/index"}

{if "{segment_2}"==""}

<div id="entry-container" data-behaviour="moreEntries">
     <div class="ajax-wrapper">
            {exp:channel:entries
               channel="vacancies"
                dynamic="no"
              orderby="date"
              limit="2"

        }

    {if no_results}
        <div class="entry">
            <article style="min-height: 600px;">
                <header>
                    <h1>No Results</h1>
                </header>
                Check back soon for more blog posts.
            </article>
        </div> <!-- /.entry -->
    {/if}
    <div class="entry">
        <article>
            <header>
                {title}
            </header>
           {vacancy_details}
        </article>
    </div> <!-- /.entry -->

    {paginate}
    <p class="moreEntries">
        {if next_page}<a href="{auto_path}" class="more" id="next">See More Posts</a>{/if}
    </p>
    {/paginate}
    {/exp:channel:entries}
  </div>
</div>
{/if}

<link href="{site_url}css/styles.css" rel="stylesheet">
<link href="//maxcdn.bootstrapcdn.com/font-awesome/4.1.0/css/font-awesome.min.css" rel="stylesheet">
<link rel="stylesheet" href="{site_url}bootstrapvalidator/css/bootstrapValidator.min.css"/>

<script src="{site_url}js/bootstrap.min.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script>

<script type="text/javascript">
 $(document).ready(function()
   {
    $('#entry-container').delegate('.more', 'click', function(e)
    {
        // Don't follow the link
        e.preventDefault();

        // Create a loading message and add it in place of the link
        loadingMessage = $('<p class="loading">Loading...</p>');
        $('.moreEntries').replaceWith(loadingMessage);

        // Fetch the next page
        $.get($(this).attr('href'), function(data)
        {
            // Only grab the part of the page we want
            content = $(data).find('.ajax-wrapper').hide();

            // Add it to the DOM
            $(content).appendTo('#entry-container');

            // Remove loading indicator
            $('.loading').fadeOut('fast').remove();

            // Fade-in our new content
            $(content).fadeIn('fast');
        });
    });
});
</script>
</body>
</html>

```

# Answer
> 0 votes
Though the URL does not display the pagination segment (e.g. P10), it is valid at the parse stage. I was checking {if "{segment\_2}" == ""} and expecting it to be true, but it was actually false because the pagination segment exists when the template parses.

Providing the template conditionals are written with this in mind, infinite scroll works just as well as normal pagination.

# Answer
> 1 votes
Don't use the curly brackets and quotes on the segment in your conditional. Write your conditional like this:

```
{if segment_2 == ""}

```

Edit:

* your closing div for entry-container is missing the last character.
* Your link tags should be in de head of the document
* The final script tag is not closed.

---
Tags: pagination, jquery, javascript, ajax
---


# Question
Title: Store: Member has ability to download order information
Question has nothing to do with the product download tag.

How do I enable a member to download their order information without access to the CP? Just like the report generation in the Store CP, but I want to do this on a member level on a per order basis on the front-end of the website when the member is logged in.

# Answer
The quickest and probably one of the easiest ways is to use an add-on like PDF Press to easily create a PDF for download using the Store Orders tag pair.
> 1 votes

# Answer
Or, if you just want to display the customers orders on the front end of the site (say in the customers account area) use Expresso-Stores `{exp:store:orders}` tags as Justin says, but use them on a template . Full documentation of the tag pair is here : https://www.exp-resso.com/docs/orders\_tag.html
> 1 votes

---
Tags: expresso-store
---


title: Bigger File Preview Thumbnail Size

text:
# Question
Title: Bigger File Preview Thumbnail Size
Looking for a way to increase the default thumbnail size of an image uploaded via the file uploader in the CMS e.g:

At this size, it's hard to tell what is in the image itself. Ideally, we should be able to control this thumbnail size and make it bigger so you can see the image clearly from within the entry editor.

Can't seem to find any plugins or information.

Would rather avoid having to hack the core.

# Answer
You can't change this without hacking core, no.

Assets offers much nicer thumbnails then the native File field (with various size options too).
> 0 votes

---
Tags: file-uploads, image
---


# Question
Title: Is it possible to remove but not delete an image from Channel Images?
Is there a way to remove images from an entry but not delete it from the filesystem?

Thank you in advance.

L.

# Answer
> 0 votes
I don't believe it's possible to remove an image without deleting it. But you could set up categories in a custom field and make one of the categories "closed" and then filter out images with category=closed.

---
Tags: channel-images
---


title: Exp:resso Store Payment Gateway changes

text:
# Question
Title: Exp:resso Store Payment Gateway changes
In a recent version of Exp:resso Store since (2.3.1) there has been a change in what information gets passed to the Payment Gateways (I believe using the function getDescription();).

In 2.3.1 the OrderID was passed, in both 2.5.0 and 2.5.1 it is the Cart ID that is passed (now these are separate things). This is paying havoc with my client accounting team, who now have no obvious way to tally Payments (on both SagePay and Paypal Express) with the orders.

Is this a bug, or designed behaviour? If designed behaviour is there a way I can get the order ID on the AuthoriseRequest.php scripts please?

# Answer
The new version of Store as of 2.5+ Carts and Orders are now separate database tables. This allows for sequential order ids and also more control over what you can do with carts for marketing automation.

So now an order id is not generated until after the completion of the payment. So only cart ids are passed to the gateway. The order id will be different on its return from the gateway.
> 1 votes

---
Tags: expresso-store, devdemon, payment-gateway
---


# Question
Title: devDemon Forms - Stripe gets no receipt_email for guest payments
We have DevDemon forms up and running, our form works, payments go through our Stripe account in test mode.

* We are processing payments for guests of the EE installation, not registered EE users.
* We have an Email field which has a short name of receipt\_email.
* Stripe says there is no email passed, so no receipt can be emailed out.

**Question:** Is it possible to pass the email from the form (receipt\_email) as the email for stripe to use when sending out a receipt?

# Answer
> 0 votes
Do you have your email field set as Master?

---
Tags: stripe, devdemon-forms
---


# Question
Title: How to get the parent entry ID while inside relationship loop?
I need to get the parent entry\_id while I'm inside a relationship. This is what I have - doctors\_locations is my relationship field name:

```
{doctors_locations}
    {doctors_locations:locations_city} {!-- outputs related city --}
    {doctors_locations:parents}{entry_id}{/doctors_locations:parents} {!-- I need the entry_id of the parent in this relationship --}
{/doctors_locations}

```

I've tried different iterations of this to no avail. Everything I've tried seems to cause a memory error -- assuming endless loop?

Is it possible to get the parent entry\_id while inside of the relationship loop? I've managed to accomplish the same thing using Playa, but I needed to switch the doctors\_locations field type to a Relationship field.

I'm using EE 2.10.1.

UPDATE: Based on the info here: https://ellislab.com/expressionengine/user-guide/add-ons/channel/relationships.html#accessing-parents I should be able to accomplish this. So I updated my code like this (tried it with just the title):

```
{doctors_locations}
    {doctors_locations:parents field="doctors_locations"}
        {doctors_locations:parents:title}
    {/doctors_locations:parents}
{/doctors_locations}

```

I get the following error:

```
Fatal Error: Allowed memory size of 268435456 bytes exhausted (tried to allocate 1 bytes) in ../system/codeigniter/system/database/drivers/mysql/mysql_result.php

```

# Answer
You're entering an infinite recursive loop with your code there, hence the memory exhaustion. All you need to do is this:

```
{doctors_locations}
    Location Title: {doctors_locations:title}
    Location Entry ID: {doctors_locations:entry_id}
    Doctor Title: {title}
    Doctor Entry ID: {entry_id}
{/doctors_locations}

```

You would only further use `{doctors_locations:parents}` if you wanted to fetch parents from a *different* channel/field than the parent channel you're already in via `channel:entries`.
> 1 votes

---
Tags: relationships, parent
---


# Question
Title: Evaluating limited stock when product modifier options are fractional
So I'm building an ecommerce site that sells items in the following quantities:

* Whole
* Half
* Quarter
* Eighth

The whole option is the default. So when they input the stock quantity (e.g. 100 whole items), I want that to mean that there are 200 half items, etc..

As a result, if someone orders 3 halves, I want the stock to be reduced to 98 whole and 1 half of that item.

Is there a way to do this in expresso store?

# Answer
> 2 votes
You'd have to make the quantity represented as the smallest available fraction (e.g., 1/8), and make your quantity selector on the front-end reflect that. So if you had 100 whole items in inventory, you'd enter 800, then make a selection of "1" equal "8" on the front end.

Not ideal, but the only way I can see to do this with Store's inventory system.

---
Tags: expresso-store
---


# Question
Title: DevDevmon Subscriptions CRON URL Triggering Error Page
Subscriptions has been working fine for several weeks, but all of a sudden, a bunch of my subscriptions slipped into "Past Due" status. I tried to manually enter the module action URL in my browser (they have it programmed to display a status of what happens as it attempts to renew any past due subscriptions), but after outputting a few rows it reloads, this time using the EE Error template (user message template), and refuses to continue.

The "error" was something about a missing {/if} or errant } or something. This didn't make any sense because the action url shouldn't invoke the template parsing engine.

How could something in the Subscriptions update process trigger an error in the template parsing engine?

# Answer
> 2 votes
Believe it or not, this was caused by an error in one of my email templates.

When a subscription attempts to renew, it fires a trigger based on what the result of that renewal is.

If you have a "send email" action linked to that trigger, the template parsing engine will attempt to parse the email template in order to fulfill action.

If the email template has an error in it (as mine did), this will cause an unholy crossing of the Subscription CRON url page and the EE error template.

---
Tags: subscriptions
---


# Question
Title: DevDemon Subscriptions Not Renewing Automatically - All are "Skipped"
When my first group of subscribers came up for renewal, all of them slipped into Past Due status.

* Nothing was in the Subscription event log to indicate anything had happened.
* Stripe had no record of attempted payments.

On the advice of DevDemon I manually backdated the "next retry" date on one of the subscriptions (in the database), then manually visited the Subscriptions CRON url in my browser.

The process ran, and behold, the renewal process worked. So I repeated this process for all the other past\_due subscriptions.

But the next day, more of them had failed to renew. So I started the process over again. And once again, when I triggered the update via the web, it worked fine.

Why would CRON based updates fail, but when I trigger it via the web, everything works?

# Answer
FIX: I had both: 127.0.0.1 and 192.168.\* IPs in the "Test IPs" field. (I think this was the default setting).

When the update process was run (triggered by a CRON job), Automat:ee would call the Subscriptions action URL, but the IP was obviously the local machine IP, 127.0.0.1 and the entire update process would be treated as a test.

That explains why manually triggering it in the browser worked. I removed those IPs from the list and it worked after that.
> 0 votes

---
Tags: devdemon, subscriptions
---


title: Files Above Root - How to Access?

text:
# Question
Title: Files Above Root - How to Access?
I'm working on a site where a user can upload their resume. I created this folder above root for security. When the user submits the form, the attached file uploads to the "secure" folder without issue (I can see it). However, when I go to the Forms module and look at the submissions, clicking on the file gives me an error that "The page you requested was not found."

Not sure if this is normal for files stored above root or if I have a path messed up?

Thanks in advance!

Todd

# Answer
It seems your web user (whatever user the website executes under) does not have permission to get outside the root directory. This is normal as this way the website (or code executed by the website) can't escape its root (look into open\_basedir).

This or the file uploaded does not grant the right permissions when copied from the server temp to the uplaod directory. Can you elaborate on the file and folder permissions (owner and group too) for the directory outsdie of the root? It could be the file is added as root or some other priviledged user, so you can see the files with your root user but the websie user can't...

One thing you can do, that Ive done before to handle this sort of thing (importing SFTP uploads under a different domain but not allowing the website to be able to access the other domain), is to set up a SymLink within the root directory. you can then access that directory as a child of the root directory, as long as the destination dir has permission granted for the web user. This would defeat the object though.

Coming to it, what is your objective? You mention storing uploaded files outside of root for security, however you want the web user to uplaod to this directory, and be able to read this directory (so you can browse the file in the CP). In other words you want the web user to be able to access it but not access it...

**Edit 1** Following sicussion a few more things to try

Thinking about this, there's a couple of things you can try to drill down the issue :

1. Try accessing the file using a relative path This is simple, pop a text folder in the 'secret' directory and write a simpel PHP script to read and display the text file. If PHP can read and display it then yes the web user can read the secret folder.

1a. Assuming the web user can access the file, check your path's as it's most likely this is fudged.

1b. Assuming the web user can not access the text file, this indicates that in fact there is a security measure in place stopping the user from excaping the root, double check bopen\_basedir settings (check vhosts too), also check your web site management software (for instance plesk enforces root directory encapsulisation regardless)
2. How do we allow access for web user when via the EE CP, but deny other requests? https://stackoverflow.com/questions/2679524/block-direct-access-to-a-file-over-http-but-allow-php-script-access Basically, assuming we can get the web user accessing the file, we then drop a /htaccess into the uploads directory that deny's access, becuase the web user execuse script on the server on the local file system it should still be able to reach the files, however a direct (URL based) access will be denied by the .htaccess policy

In short, the fact that your web user can not access the files indicates there is some security somewhere blocking you, once w work out where this is and defeat it we can then look to guard against direct access. Note you \_could\_apply this principle inside the root directory, so that htaccess blocks direct/link/URL access to the file but the web user/PHP can reach it.
> 1 votes

# Answer
This might be a file/directory ownership issue. Depending on what kind of host/server you're on, the system "root" user might actually be the owner of all the files in web root.

For a lot of stuff this is fine, but occasionally, EE will choke on something unless it's owned by the web user.

Note, by 'web user' I'm not referring to the 'person uploading the document to your site'. The 'web user' is basically the account that runs web stuff like ExpressionEngine. When your 'website user' is using your website, EE is running under the 'web user' account on the system.

So if the files that EE needs to access are owned by "root", then PHP processes (which runs as the web user) cannot do certain things, even if the files have 777 permissions.

So you need to use the chown command to change the owner on any files in web root, and any files above webroot that EE needs to access.

**DO NOT DO THIS, THIS IS AN EXAMPLE**

On Ubuntu, the web user is **www-data**. When I need to change the owner of a directory on my server, I cd to the correct directory and type:

```
chown -R www-data:www-data ./*

```

This tells the server to change the owner of everything in this directory to the web user.

Once again, do not type that verbatim, you need to replace **www-data** with the name of the web user for your server.
> 1 votes

---
Tags: devdemon-forms
---


# Question
Title: Subscriptions - allow users to switch off auto-renew for their subscriptions
Is it possible to allow a user to 'switch off' auto-renew for their subscription so it expires automatically at the end of the current period?

For example, say a user is 6 months in to a 12 month subscription and they want to stay until the end of that 12 months, but they don't want their subscription to be renewed at the end of the 12 months. Is that possible?

# Answer
I've just realised this can be done easily by setting the cancel\_now parameter of the {exp:subs:cancel} tag to 'no'. In fact this is the default behaviour!
> 1 votes

# Answer
FYI - there is actually a way to have auto-renew disabled at the time of signup.

You can put an input in your form like this:

```
<select name="auto_renew">
  <option value="yes">Please Auto-Renew Annually</option>
  <option value="no">Do Not Auto-Renew</option>
</select>

```

The **auto\_renew** option is not documented, but it will create the subscription and have it marked to not auto renew after the first payment.

I stumbled onto this because I realized that some people wanted to pay their subscription manually every month, but without knowing the **auto\_renew** option, every time they'd "renew" it, auto renewal would be turned back on, so they'd have to "Cancel" each time.
> 0 votes

---
Tags: subscriptions
---


# Question
Title: Problems with new member registration email and SolSpace User
We are using SolSpace User to handle key invites and member signup and also using the screen name override feature.

There are quite a few members on this site, so we added the member\_id field to the screen name override, so it's like this: first\_name|last\_name|member\_id.

That works great for dealing with conflicting screen names, but the EE email that goes out to the admin to let him know that a new member registered is now showing "garbage" for the name.

```
Member name: 4f99fa19c1d3b11c9ad517b0c073e450

```

Thoughts?

# Answer
> 1 votes
I can confirm that the screen\_name override is a temporary hash at the point where the admin email notification is being sent. This is caused by member\_id in the User code. I'll report this, but unfortunately we don't have an ETA for possible fixing/implementation. The workaround for now would be to not use member\_id in the screen\_name override, or use something other than the screen\_name in the admin notification.

---
Tags: solspace, solspace-user
---


# Question
Title: Is the "Profile:Edit" module still available?
This module is exactly what I need. But it's not possible to download/buy it from the devot-ee (https://devot-ee.com/add-ons/profileedit) website.

Does anybody know if it is still available?

# Answer
> 1 votes
No, it is not - Mighty Big Robot is not developing, selling, or supporting any of their add-ons anymore.

Maybe have a look at Zoo Visitor.

---
Tags: profile-edit
---


# Question
Title: Update field content with extension when saving or editing an entry
I have created an extension which uses the entry\_submission\_ready hook. It is doing some calculations which I want to add to a field in the entry.

How can I add the output of the calculations to the field when saving an entry?

# Answer
> 0 votes
You can set your values directly on the API object like so:

```
ee()->api_channel_entries->data['field_id_X'] = 'Foo';

```

---
Tags: add-on-development, extension, hook
---


# Question
Title: With freeform_module_insert_end hook how to get the posted data
https://solspace.com/docs/freeform/extension\_hooks/#freeform\_module\_insert\_end

I am using the `freeform_module_insert_begin` hook which stores the data into the database but with the `freeform_module_insert_end` hook I am unable to get the data which I posted in the `freeform_module_insert_begin` hook.

Here is my code:

```
function email_this($field_input_data, $entry_id, $form_id){
if (ee()->extensions->active_hook('freeform_module_insert_end') === TRUE)
{
    ee()->extensions->universal_call(
    'freeform_module_insert_end',
    $field_input_data,
    $entry_id,
    $form_id,
    $this
    );
} else {
    //else
}
}

```

# Answer
> 1 votes
The entire `$_POST` array should still be available inside that hook (though for security you should access it via `ee()->input->post()`).

But your code is incorrect (I can see how the docs are confusing there). What you've posted is their demonstration of how the hook appears *inside the module* \- not an example of how to use the hook.

You need to first insert a row into `exp_extensions` which maps `freeform_module_insert_end` to your `email_this` function (see docs). Then just write your function like so:

```
function email_this($field_input_data, $entry_id, $form_id, $freeform_object)
{
    // Do what you need to do in here
    // ee()->input->post('my_field_name') should be available here as well
}

```

---
Tags: solspace-freeform
---


# Question
Title: Trying to use the bxSlider by setting the <li> as fields as background images in expressionengine
I am using the bxSlider in full screen (filling entire browser window) mode. To have the images become full screen I set the images in the list as background-image: url images. I created this in html and it worked out fine. The images reach full width. Here is an example of what my HTML looks like:

```
<ul class="bxslider">
  <li style="background-image: url('slide1.jpg');"></li>
  <li style="background-image: url('slide2.jpg');"></li>
  <li style="background-image: url('slide3.jpg');"></li>
  <li style="background-image: url('slide4.jpg');"></li>
</ul>

```

Now, I want to incorporate it into expressionengine by allowing the admin to upload the slider images in the backend in the corresponding channel entry. I have created the channel fields labeled "slider\_image1", "slider\_image2", "slider\_image3", "slider\_image4" in the channel named, "slider\_test." I am using expresionengine v2.6.1

I have been struggling for the correct markup and have tried the following which has not worked:

```
<ul class="bxslider">
  {exp:channel:entries channel="{slider_test}"}
    <li style="background-image: url({slider_image1});"></li>
    <li style="background-image: url({slider_image2});"></li>
    <li style="background-image: url({slider_image3});"></li>
  {/exp:channel:entries}
</ul>

```

Any help would be appreciated. I also would like to include an if statement so that if the user only uploads two images the third one won't display.

I also would like to see if its also possible to incorporate the title="" element which the bxSlider uses as the captions. I know that the title element is meant for the html element so would love some ideas as to how this can be done.

I have changed the code to

```
<ul class="bxslider">
  {exp:channel:entries channel="slider_test" dynamic="no"}
    <li style="background-image: url({slider_image1});"></li>
    <li style="background-image: url({slider_image2});"></li>
    <li style="background-image: url({slider_image3});"></li>
  {/exp:channel:entries}
</ul>

```

this still isn't working

My title for my channel entry is, "slider images" I have changed it to

```
<ul class="bxslider">
  {exp:channel:entries channel="slider_test" dynamic="no" limit="1"}
    {slider images}
    <li style="background-image: url({slider_image1});"></li>
    <li style="background-image: url({slider_image2});"></li>
    <li style="background-image: url({slider_image3});"></li>
  {/exp:channel:entries}
</ul>

```

Still isn't working. Thank you again for your patience. The status of the entry is open, The URL title for the channel entry is "slider-images"

It works this way but this isn't what I want because I am trying to set the images as backgrounds:

```
<ul class="bxslider">
  {exp:channel:entries channel="slider_test" dynamic="no" limit="1"}
    {slider images}
    <li>{slider_image1}</li>
    <li>{slider_image2}</li>
    <li>{slider_image3}</li>
  {/exp:channel:entries}
</ul>

```

This just sets the images inside the li. How do I set the li as background images while still allowing the user to choose what image to upload?

Can anyone help me figure this out?

As suggest for debugging I used:

```
  {exp:channel:entries channel="slider_test" dynamic="no" limit="1"}
    <pre>{slider_image1}{url}{/slider_image1}</pre>
  {/exp:channel:entries}

```

I am getting a valid URL for the file in the PRE tag by removing setting the image as background. But I want them set as background.

Again, thank you all so much for helping me out with this. I really do appreciate it. As I'm sure you can tell by now I am still fairly new with expressionengine.

So, I have removed the ul li all together and tried using a div and setting the background image as suggested with the following markup:

```
  {exp:channel:entries channel="slider_test" dynamic="no" limit="1"}
    {slider images}
    <div style="width:100%;height:100%; background-image: url('{slider_image1}{url}{/slider_image1}')">
  {/exp:channel:entries}

```

The output is rather strange. The image does not appear as a background image rather in the css says this: background-image: url( '\< p \> \< img alt= ;

This url:

http://www.financialadvisorycorp.com/slider\_full\_width

contains this code:

```
  {exp:channel:entries channel="slider_test" dynamic="no" limit="1"}
    <div style="width:100%;height:100%; background-image: url('{slider_image1}{url}{/slider_image1}')">
  {/exp:channel:entries}

```

And This url:

http://www.financialadvisorycorp.com/slider\_full\_width\_image

contains this code:

```
  {exp:channel:entries channel="slider_test" dynamic="no" limit="1"}
    <pre>{slider_image1}{url}{/slider_image1}</pre>
  {/exp:channel:entries}

```

I would love to figure out how to set the slider images as backgrounds

# Answer
Will this work for you? You don't need to put the {slider images} tag, it doesn't do anything.

```
<ul class="bxslider">
    {exp:channel:entries channel="slider_test" dynamic="no" limit="1"}
        <li style="background-image: url('{slider_image1}{url}{/slider_image1}');"></li>
        <li style="background-image: url('{slider_image2}{url}{/slider_image2}');"></li>
        {if slider_image3}
        <li style="background-image: url('{slider_image3}{url}{/slider_image3}');"></li>
        {/if}
    {/exp:channel:entries}
</ul>

```
> 1 votes

# Answer
and welcome!

The issue looks to be within your channel entries tag.

Can I ask what channel did you post your entry in?

Also, how many entries are you trying to pull in?

your code `{exp:channel:entries channel="{slider_test}"}` seems incorrect, hence why I ask your channel name, assuming your channel is called 'Banners' \[banners\] your channel entries tag will look like this

```
{exp:channel:entries channel="banners" dynamic="no"}

```

Adding `dynamic="no"` tells EE not to try and work out what you want from the URL. Of course the above will iterate each and every entry in the channel. You mention you've crated the channel fields but have you made an entry in your channel yet? Do this. From here you will be able to assertain the `entry_id` of your first entry, for example I'm gonna say "5". In order to bring the image URL's in you will need to specify the entry ID you want (or you'll get a `<ul>` for every entry!) like so :

```
{exp:channel:entries channel="banners" dynamic="no" entry_id="5"}

```

This will load one entry in the channel, and will product your `<ul>` properly. Remember Channels are containers for many entries. each entry in a specific channel will have the field you describe.

Doing it this way, if you wanted to create a different banner/slider set, you can just publish a new entry to the channel, and update `entry_id` in your Channel Entries loop.

**Edit 1** Following comments...

Please try this :

```
<ul class="bxslider">
  {exp:channel:entries channel="slider_test" dynamic="no" limit="1"}
    {title}
    <li style="background-image: url('{slider_image1}');"></li>
    <li style="background-image: url('{slider_image2}');"></li>
    <li style="background-image: url('{slider_image3}');"></li>
  {/exp:channel:entries}
</ul>

```

We're adding the `{title}` to check it is finding and displaying your entry (check the status of the entry as Closed would cause it not to show!) if this works correctly, then we'll look into your fields...

**Edit 2**

Try this for debugging :

```
{exp:channel:entries channel="slider_test" dynamic="no" limit="1"}
    <pre>{slider_image1}{url}{/slider_image1}</pre>
{/exp:channel:entries}

```

This will show us if the problem is in your entry/file manager, as it takes the ul, li and bxslider out the equasion! If you're not getting a valid URL for the ffile in the PRE tags we need to review (a) your entry and (b) your File Upload Settings. Here's a list of questions for ya :

1. (relivent to a.the entry) When you Edit the entry, are the files thumbnails appearing correctly (in the CP)?
2. (relivent to b.file upoad settings) In File Manager, can you see and view the images you uplaoded?
3. For the file field you've put in your channel fields, what is the file upload directory?
4. In Content . File Upload Preferences, for the destination you answered in step 3, what is the 'Server Path to Upload Directory' setting and waht is the 'URL of Upload Directory' setting
5. What TYPE of field is `{slider_image1}`, `{slider_image2}` and `{slider_image3}`, a File field right?

**Edit 3** Some more progress

Ok, so we've solved the channel issue, and we've determined the right path is coming out of the tags, but it's not going in as a background image, therefor can you try this code :

```
<ul class="">
  {exp:channel:entries channel="slider_test" dynamic="no" limit="1"}
    <li style="background-image: url('{slider_image1}{url}{/slider_image1}');"></li>
    <li style="background-image: url('{slider_image2}{url}{/slider_image2}');"></li>
    <li style="background-image: url('{slider_image3}{url}{/slider_image3}');"></li>
  {/exp:channel:entries}
</ul>

```

And most importantly **please post the resultant HTML**, as a copy from source please. Note I've taken bxslider class out to see if its the bxslider loader JS wiping the images.
> 0 votes

# Answer
So the problem ended up being that I was using Wygwam in my channel field for {slider\_image1}. Wygwam aslo has a file upload area where the user can upload the file. However the code only seems to be accepted with the channel field being set to type: file even though the image uploaded via Wygwam does normally show up as an image source and is another way to upload the file.

By using:

{exp:channel:entries channel="slider\_test" dynamic="no" limit="1"}

\< div style="width:100%;height:100%; background-image: url('{slider\_image1}')"\>

{/exp:channel:entries}

The image does display as a background image only when the channel field is set to file. Thank you again for all of those who helped.
> 0 votes

---
Tags: ee2, channel-entries, file-uploads, fields, channel-fields
---


# Question
Title: Two search results tags with separate pagination on the same page
I have a search results page using Low Search that has two tabs on it for two different sets of search results. I think that the fact that this uses Low Search is mostly irrelevant for this question since I'd have this same issue if I was just using two channel entries tags on the page.

One tab is pulling in local results using geocoded distance parameters. The other tab is pulling in all results, ignoring the distance parameters.

This is working well, but the problem comes in when we have multiple pages. For example, sometimes there are multiple pages of results in the first tab and only one page of results in the first tab. So if the user goes to the second tab and clicks through to the 4th page, then clicks back to the first tab they see no results because it's using the P40 segment in the URL to look for the 4th page of results but not finding a 4th page for the results in that tab. Here's an example of the full search URL:

https://www.domain.org/search-results/P40?keywords=thiskeyword&distance:radius=100&location=Austin&distance:from=32.7766642|-96.79698789999998

Can anyone think of a workaround for this? I haven't been able to figure out a good solution to have pagination only apply to one specific results tag or channel entries tag on the page.

# Answer
> 1 votes
You need to use Low Search with an Ajax functionality. You can individualize each search tab (separate them programmatically with different DOM id's and jQuery calls) and hit the ACTion URL of the add-on, and update the DOM asynchronously.

https://gist.github.com/low/4632695

Once you get your

```
data

```

variable back, just use jQuery to remove and recreate your result tab results. You will lose out a little though; web crawlers won't be able to crawl the entirety of your search results, but I figure you didn't really have that going on anyways unless you also have the option of opening the two searches on two different pages (open each one individually with crawlable URLs). In which case, you're kinda of covered there.

---
Tags: pagination
---


title: Upgrading to 2.10.1

text:
# Question
Title: Upgrading to 2.10.1
I'm trying to upgrade from 2.8.1 to 2.10.1 and the installer seems to get into an infinite loop. It looks like it is having troubles with the config.php file. All the directory and file permissions are correct.

I've also noticed that the installer has identified my existing install as "Public Beta pb01", which I have no idea where it is getting that from (somewhere in the database?), though way back that was the first version of EE I installed. In my config.php file I have $config\['app\_version'\] = "281";

After stopping the install this is the resulting config.php file:

Can anyone point me in the right direction? Thanks and cheers!

# Answer
The issue was that I was using PHP 5.4.39 and when I upgraded to 5.4.41 it resolved the error. Hope this helps someone.
> 1 votes

---
Tags: install
---


title: Unable to Load Site Preferences

text:
# Question
Title: Unable to Load Site Preferences
I'm trying to duplicate a site onto a different server and am running into the old "Site Error: Unable to Load Site Preferences; No Preferences Found" error. Through searchign the forums some fixes I've tried are to re-export / import the database, re-uploaded all the files to the server and no dice. I've got 777 permissions on my config.php and database.php. I have also checked with simple PHP script to see if I am able to successfully connect to my DB with my settings and that worked fine.

I did find that the code causing the error (in /core/EE\_Config.php):

```
if ($query->num_rows() == 0)
{
    if ($site_name == '' && $site_id != 1)
    {
        $this->site_prefs('', 1);
        return;
    }

    show_error("Site Error:  Unable to Load Site Preferences; No Preferences Found", 503);
}

```

Can someone out there help to explain what this means and perhaps a potential solution?

# Answer
> 5 votes
This error may caused if EE couldn't make database connection. Check your hostname, username, password within "/system/expressionengine/config/database.php".

Also could you check "exp\_sites" database table if its having at least one record (multiple records for MSM site) if not, import this table properly.

# Answer
> 0 votes
I've run into this error many times and it always ends up being an issue connecting the to database. These are the things I check:

1. If you're trying to connect to a remote DB from a local instance of EE, make sure that the MySQL port is open on your DB server. By default the port is 3306. If you're not sure how verify if the port is open, see if your host will do it for you. I use Rackspace for hosting and they're very helpful with things like this.
2. EE provides you with a DB testing utility which can be found in system \> expressionengine \> utilities \> dbtest.php. Copy that file to your webroot, modify lines 4-7 with the credentials from your database.php file, and hit the page. You'll get feedback on failure or success with your connection.
3. Verify that your config.php and database.php files have 666 permissions. I do not recommend that you set these to 777 as you stated above.

---
Tags: ee2, database, config
---


# Question
Title: Freeform Pro confirmation message inside Fancybox
Trying to send message using Freeform Pro in a lightbox (Fancybox). I'd like to have confirmation message display inside of lightbox after successful submit. Not quite sure the best way to accomplish this. Any insight or advise?

# Answer
> 1 votes
If you want the thank you message to appear in the same Lightbox window as the form, without a refresh, you'll need to do this with Ajax. This is the basic outline of how this would happen:

1. Create a Thank You page in the CMS with your content.
2. Create your Freeform form and put it in the Lightbox. I'm assuming it's invoked by clicking a link on the containing page? Wrap the whole form (all the content you want to replace) with a div class="ajax-content" (or whatever you want to call it).
3. Give your submit button a class like "get-thank-you" and create an onclick event for this button that replaces ajax-content with data from the thank you url. You can find an example of how to do this here: https://stackoverflow.com/a/13832977/990061

Hope this makes sense?

---
Tags: solspace-freeform, email, confirmation
---


# Question
Title: Best method for mulit-file upload in Freeform?
Looking for advice on the best way to handle multiple file uploads associated with a Freeform entry. We have a form that collects basic text-based demographic information, but it also requires several 4-5MB uploads.

I'd like to avoid asking users to zip into one file, but doing 4-5 http uploads seems dangerous. Any great ideas?

# Answer
> 0 votes
Don't know FreeForm very well, but I bet this addon:

https://devot-ee.com/add-ons/low-freeform-field

would work great with for allowing you to use a Matrix fieldtype (a purchased fieldtype, I don't work for them but it works pretty well) with a FreeForm form. You could probably use it to allow a single column Matrix fieldtype that user can expand on in the front-end; you'll need to do some work to make it all work but it smells like an answer to me.

---
Tags: solspace-freeform, file-uploads
---


title: Hide Grid row based on date

text:
# Question
Title: Hide Grid row based on date
I am using the Grid field built into EE, 2.8.1, to display event dates. In the Grid column I have an event date field to let you know when the event starts. What I would like to do is have this date field then somehow have the field no longer display 24 hours after the event start time.

I got this working by setting up an expiration date field but thought it would be easier for the end user not to have to fill that in since it is not the best workflow for the data entry person.

Is there a certain way to automagically do this?

Here is my current template code. I am using the **Math Plus** plugin to help with math but not sure if I am even approaching this correctly.

```
{bio_pull_in_tour_dates}
<tbody>
        {bio_pull_in_tour_dates:tour_dates orderby="bio_pull_in_tour_dates:tour_dates:tour_date_of_show" sort="asc"}

        {if {bio_pull_in_tour_dates:tour_dates:tour_date_of_show format="%U"} < {exp:math_plus decimal_places="0" calculate="({var1} + {var2})" var1="{bio_pull_in_tour_dates:tour_dates:tour_date_of_show format="%U"}" var2="86400" }{math_plus_result}{/exp:math_plus}}

            <tr>
                <td class="col-md-2">{bio_pull_in_tour_dates:tour_dates:tour_date_of_show format="%n/%j/%y"}</td>
                <td class="col-md-2">{bio_pull_in_tour_dates:tour_dates:tour_venue}</td>
                <td class="col-md-2">{bio_pull_in_tour_dates:tour_dates:tour_city}, {bio_pull_in_tour_dates:tour_dates:tour_state}</td>

                <td class="col-md-2">{bio_pull_in_tour_dates:tour_dates:country}</td>
                <td class="col-md-4">
                    Start Time: {bio_pull_in_tour_dates:tour_dates:tour_date_of_show format="%U"}<br/>
                    Current Time: {current_time format="%U"}<br/>
                    Expire Time: {exp:math_plus decimal_places="0" calculate="({var1} + {var2})" var1="{bio_pull_in_tour_dates:tour_dates:tour_date_of_show format="%U"}" var2="86400" }{math_plus_result}{/exp:math_plus}<br/>
                     <br/>
                     {bio_pull_in_tour_dates:tour_dates:tour_additional_info}
                     <br/>Marked Expire </td>
            </tr>
        {/if}
        {/bio_pull_in_tour_dates:tour_dates}
</tbody>
{/bio_pull_in_tour_dates}

```

So I am taking the date of show field converting it's format to Epoch seconds. Then I am comparing the start time to the sum of the start time plus 86400 since that is how many seconds are in a day. this should work but it does not appear to do so.

I hope this makes sense. If there are better ways to get the row to hide after a certain amount of time please point me in the correct direction,

thanks in advanced.

# Answer
> 1 votes
First: a value will always be smaller than itself plus any other value. You need to compare the date against the `{current_time}`.

Second, you need to parse all values before the Math Plus plugin, so the data can be available to it.

```
{exp:channel:entries paser="inward" [...]}

```

If you can update EECMS, you should. The version 2.9 has new mathematical conditionals operators that can help you to keep your code simple.

```
{if bio_pull_in_tour_dates:tour_dates:tour_date_of_show + 86400 > {current_time} }

```

I'm not sure if you gonna need to put `bio_pull_in_tour_dates:tour_dates:tour_date_of_show` between `'{` and `}'`. Please, test and help me to improve this answer.

---
Tags: grid, date, math
---


# Question
Title: 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 work:

```
{if freeform:count == 1}<h1>Submissions</h1>{/if}

```

Works:

```
<p>The count is {freeform:count}</p>
{if freeform:count == 1}<h1>Submissions</h1>{/if}

```

I'm using EE 2.73 and FreeForm Pro 4.2.0

Thanks for any ideas

# Answer
> 0 votes
This looks like a custom template parsing function.

Some add-ons do not use the default Template Parsing Class and can run into this kind of error. However, I can't say for sure, since I can't check the code.

My first suggestion is to update EECMS. The changes implemented on the version 2.9 can maybe help you.

The other one is to delay the parsing of the conditional:

```
{if '{freeform:count}' == 1}<h1>Submissions</h1>{/if}

```

By this way, the freeform parser will replace the `{freeform:count}` variable and the conditional will be parsed further.

But try to update EECMS first.

# Answer
> 1 votes
That's an odd one, It seems the former is being treated as a simple conditional and ergo executed prior to modules, while the latter is correctly recognised as advanced and so parsed after the module tags?

Can't be sure but I think I'm guessing wildly here! Would you be up for trying a couple of other experiments to see if we can (a) solve and (b) diagnose?

1. Force Advanced Conditional (is it parse order??)

```
{if freeform:count == 1}<h1>Submissions</h1>{if:else}{/if}

```

**Result** : *Epic FAIL*

this will definatly force the parsing of the conditional to after the module tags. This is not the best example of forcing advanced conditionals but it WILL work :)

2. Try a different syntax

```
{if {freeform:count} == 1}<h1>Submissions</h1>{/if}

{if '{freeform:count}' == '1'}<h1>Submissions</h1>{/if}

```

**Result** : *Winner winner, checken dinner!*

Both are a similar principle, first one just sees if the `{`tags`}` effect the parsing, the second will parse the count into a string and do a simple string comparison...

3. Ultimate work around

```
<?php //{freeform:count} ?>
{if freeform:count == 1}<h1>Submissions</h1>{/if}

```

**Result** : *Plausable*

by hiding the `{freeform:count}` within a PHP tag (remember to turn it on!) it will be excluded from the output, instead of included but hidden. JChrono's answer in a different flavour really.

---
Tags: solspace-freeform, conditionals
---


# Question
Title: Templates syncing between two different environments
We have an EE site that uses one database. That database is used for both production and for development. If we push a new template to our dev environment will we ever run into an issue where the template syncs to the database and makes it available in production, too?

What about if we have `save_tmpl_files` enabled? Will that prevent any syncing?

# Answer
Here's how it works. Out of the box templates are stored in the database. When you allow the template "to be saved as a file" it also copies the template to a location of your choice as a .html file.

Personally I use this all the time as then you can get your templates under version control, refactor them to a controlled directory ect. Not to mention the easiness of writing templates with your chosen IDE, rather than via the EE (In your face) interface.

When you are saving templates as files, and you change a template file externally from EE, EE will load the template from the database or file depending on which is most recent (see Saving templates as text files for full details), until you syncronise your templates (`Design > Templates > Syncronise Templates`). This screen exposes and compares the template last save with the file last save and allows you to update DB templates with the latest file.

This way, if you turn 'Save Template Revisions' (`Design > Templates > Global Preferences`) you can use that tool to go back through saved DB templates, update via the file, sync (causes a new entry in the DB), continue to roll back or proceed as required.

So, in summary by trying to drive 2 EE sites from one database the answer is **yes, pushing a template to the dev box will cause the Database to syncronise eventually, making the template available on the live server**. You're best bet is to seperate the databases. It seems likee folly to try to drive both the dev and live from the same DB, as anything you do on dev will effect live, and dev in turn will suffer from live loading as well. If you must why not set up a cron to regularly duplicate the live database to a development database, if you're really worried about indexes???
> 1 votes

---
Tags: templates, sync
---


title: YouVersion Button in WYGWAM

text:
# Question
Title: YouVersion Button in WYGWAM
I have a client site where there was a custom YouVersion button added to WYGWAM that stopped working after updating all the things.

It's working on an Ee 2.6.1 / Wygwam 2.7.1 site. It's now running EE 2.10 Wygwam 3.3.3 and not working.

There is a YouVersion folder/addon installed in: /themes/third\_party/wygwam/lib/ckeditor/plugins

"YouVersion" is specified in the Wygwam config, alongside a drop-down value of "extraPlugins".

The YouVersion button just doesn't appear. Nor do any of the other I see in the plugins folder and add in the extraPlugins list.

This is on a dev server, but I didn't see any pathing specified that might be affecting things.

Anything else I should look for?

# Answer
> 1 votes
I beleive this is because wit hthe update of WYGWAM comes an update to CKEditor (the editor under the hood). YOu've upgraded from CKEditor 3 to 4 in the same upgrade.

This means in turn that your v3 plugin (YouVersion) is not correctly formatted for CKEditor 4.

That or (from my memory which isn't super strong) I believe the way you add plugins to WYGWAM changed with the major version upgrade. Best to follow the documentation here : http://docs.pixelandtonic.com/wygwam/developers/ckeditor\_plugins.html

This may be of help, but might be out of date : Adding CKEditor Plugins to Wygwam

---
Tags: wygwam
---


# Question
Title: Solspace Rating: adding parameter inside the <form>
I'm using Rating from Solspace, and at the same time I use **Zurb Foundation Abide validation library**.

My goal is the **data-abide** **Zurb Foundation** parameter appears inside the form element created by the Rating module:

```
<form data-abide>

```

How it's possible that this parameter **data-abide** appears inside the **form element** when the HTML form is created by the Rating module ?

# Answer
As per the docs (and as Jim says) Try using the \`form:attribute parameter. Something like this :

```
form:data-abide=""

```

Might work, might strip the empty tag, however even if not this should get it on the form, it's just if Abide will recognise the data attribute with the 'false' value set.

```
form:data-abide="data-abide"

```

Otherwise, without rereating the form tags yourself (and losing all the tags inside) you could perhaps target the form (or all forms with a js snippet and reflow the abide stuff, summin like :

```
$('form').each(function(){
    $(this).attr('data-abide','');
    $(document).foundation('abide', 'reflow');
});

```

Abide Docs : http://foundation.zurb.com/docs/components/abide.html#adding-new-abide-content-after-page-load
> 1 votes

---
Tags: forms, parameters, solspace-rating
---


# Question
Title: How to wrap 3 channel entries with a specific div
I want to wrap a div class = row around every three channels entries. How can I do that?

```
{exp:channel:entries channel="boite_a_outils" disable="member_data|trackbacks|comments" dynamic="off" orderby="title" sort="asc" {triggers:entries}}
            {if no_results}  <p>Aucun lien relié à cette catégorie.</p>  {/if}
            {if count == 1 OR count == 4}<div class="row">{/if}
            <div class="col-xs-12 col-sm-4 text-center wrap-boite-a-outil">
                <h4>{title}</h4>

                <a href="{lien}" title="{title}" class="button">Lien</a>
            </div>
            {if count == 3 OR count == 6}</div>{/if}
        {/exp:channel:entries}

```

This is what I have so far, but I don't want this option, I want it to be dynamic. Right now, as you can see in my code, I check count if it's equal to 1 or 4...how can I make this dynamic?

Thx!

# Answer
You can use the modulus operator, introduced on version 2.9, which returns the remainder of a division.

```
  {if count = 1}
    <div class="row">
  {/if}
      <div class="col-xs-12 col-sm-4 text-center wrap-boite-a-outil">
          <h4>{title}</h4>
          <a href="{lien}" title="{title}" class="button">Lien</a>
      </div>
  {if count % 3 == 0 AND count != total_results}
    </div>
    <div class="row">
  {/if}
  {if count = total_results}
    </div>
  {/if}

```

This code will close every third entry with a `</div><div class="row">`.

Or, if you have to use an older version, try the switch variable:

```
  {if count = 1}
    <div class="row">
  {/if}
      <div class="col-xs-12 col-sm-4 text-center wrap-boite-a-outil">
          <h4>{title}</h4>
          <a href="{lien}" title="{title}" class="button">Lien</a>
      </div>
  {if count != total_results}
    {switch="||</div><div class='row'>"}
  {/if}
  {if count = total_results}
    </div>
  {/if}

```
> 1 votes

# Answer
You need to use the

```
{switch}

```

tag in your channel entries loop. You use pipes to separate what you want outputted. Here is an example:

```
{exp:channel:entries channel="boite_a_outils" disable="member_data|trackbacks|comments" dynamic="off" orderby="title" sort="asc" {triggers:entries}}

    {switch="<div class='row'>||"}

        Your entry content stuff here, {title}, {link}, etc...

    {if count != total_results}{switch="||</div>"}{/if}
    {if count == total_results}</div>{/if}

{/exp:channel:entries}

```

See those pipes in the switch tag? Since they have empty content between them, they output nothing on those loop counts. So for this tag:

```
{switch="<div class='row'>||"}

```

it outputs the first time

```
<div class='row'>

```

and then blank the second and third, then repeats.

This one:

```
{if count != total_results}{switch="||</div>"}{/if}

```

Outputs nothing the first two loops, then

```
</div>

```

the third time, then repeats. (The if conditional makes sure we don't double output

```
</div>

```

if our last row **has** three entries).

And lastly,

```
{if count == total_results}</div>{/if}

```

This makes sure that if we do end early (only two entries on last row), we still close the tag properly.
> 0 votes

---
Tags: channel
---


title: Remove Test Orders in Expresso Store

text:
# Question
Title: Remove Test Orders in Expresso Store
How do I remove test orders from an Expresso Store?

EE 2.9.2 / Expresso Store 2.5.0

# Answer
The answer below is correct for every version but 2.5.0. In 2.5.1 the checkbox is on the left and you can delete entries. The checkboxes were accidentally removed in version 2.5.0.
> 2 votes

# Answer
I asked this question earlier, and it turns out in 2.5 the delete functionality was accidentally removed according to the answer.

How to delete order?
> 3 votes

# Answer
Uhh, from the documentation:

```
Orders can be selected using the checkboxes on the right. The Select Action
drop-down can be used to bulk update the order status, or delete orders. Note
that if the status of multiple orders is updated, they will each be sent any
email notifications assigned to the new order status.

```

I've never used this addon, and it took me a less than 7 seconds to find the answer. Sorry, I don't mean to be sarcastic, but give the documentation a good look! It can answer many of your questions. This is the page I found your answer on (it has pictures that can probably help):

https://www.exp-resso.com/docs/control\_panel\_orders.html
> -2 votes

---
Tags: expresso-store, ecommerce, stripe, orders
---


# Question
Title: Link rel="next" and rel="previous" pagination in header
how can i apply pagination-with-relnext-and-relprev to pagination in the header?

i want to add

`<link rel="next" href="http://www.example.com/article?story=abc&page=3" />`

and

`<link rel="prev" href="http://www.example.com/article?story=abc&page=1" />`

on pagination page 2, and so on. with an exception for the first and last page. last page should only contain the rel="prev" and the first page should only contain rel="next"

this would not be too hard to get in the body within the current `{paginate}` tags, as i see in many other solutions, but i want it in the header as stated in the article above by Google.

anyone has an idea how to approach this problem?

# Answer
> 1 votes
Let's try with a sample pagination code from the user guide.

```
{paginate}
  {pagination_links}
    <ul>
      {first_page}
        <li><a href="{pagination_url}" class="page-first">First Page</a></li>
      {/first_page}

      {previous_page}
        <li><a href="{pagination_url}" class="page-previous">Previous Page</a></li>
        {layout:set name="previous_page"}{pagination_url}{/layout:set}
      {/previous_page}

      {page}
        <li><a href="{pagination_url}" class="page-{pagination_page_number} {if current_page}active{/if}">{pagination_page_number}</a></li>
      {/page}

      {next_page}
        {layout:set name="next_page"}{pagination_url}{/layout:set}
        <li><a href="{pagination_url}" class="page-next">Next Page</a></li>
      {/next_page}

      {last_page}
        <li><a href="{pagination_url}" class="page-last">Last Page</a></li>
      {/last_page}
    </ul>
  {/pagination_links}
{/paginate}

```

On the pagination tags, set the layout variables.

(Yeah, I know! `layout:set` should have a `output='yes'` parameter!).

Then, on your layout template:

```
{if layout:next_page}<link rel="next" href="{layout:next_page}" />{/if}
{if layout:previous_page}<link rel="prev" href="{layout:previous_page}" />{/if}

```

This could work with an `embed` too.

# Answer
> 0 votes
The only way I could create rel prev and next links within paginated pages was to create a separate extension. This is where pagination is displayed with /P## within the url for the page numbers. This works fine for what I need and have tested it on EE2.9 but should work on later versions.

I'd be interested to know if this is of use to anyone as this has been a long standing problem where I've not been able to create rel links before.

It can be downloaded from here: https://github.com/ignetic/ee-pagination-rel-links

---
Tags: pagination, seo
---


title: Safe Harbor with EE2.8+

text:
# Question
Title: Safe Harbor with EE2.8+
Does anyone know if Safe Harbor works with EE2.8+ or 2.9? I am contemplating purchasing this over Backup Pro by mithra62.

In actual fact I would like to know which is better as a ftp backup solution. I know that Backup Pro zips the files, does Safe Harbor compact the files too?

# Answer
> 0 votes
Safe Harbour does work with 2.8 and 2.9. It compacts the files too such as .zip

---
Tags: eeharbor
---


# Question
Title: Expressionengine: How to display single category information
OK, I have a very simple task ahead, which, somehow got complicated.

I'm creating a simple blog in EE, with categories. Filtering posts by categories works just fine, however, I'm trying to display additional category information ("category\_description" field), when I open specific category.

like: www.example.com/apples/ or www.example.com/oranges/ (i don't want to use reserved word like category, because it looks ugly :)

So what I want is, to pull my category info from url (eg. apples) from segment\_2, - i got that working, and display the information from apples on the page.

Tried:

```
{exp:channel:category_heading category_id="1"}

  <h2>{category_name}</h2>
  <p>{category_description}</p>

{/exp:channel:category_heading}`

```

Displays NOTHING

Tried:

```
{exp:channel:categories category="20"}

    <h2>{category_name}</h2>
    <p>{category_description}</p>

{/exp:channel:categories}

```

Displays ALL categories with "list" tags (I just want ONE without list)

# Answer
`exp:channel:category_heading` always use the URL to fetch data. There isn't a `category_id` parameter, despite it could be useful.

So, if you're not using the category word indicator and the parameter `channel`, your other option is the Query Module.

```
{exp:query sql="SELECT cat_name AS category_name, cat_description AS category_description FROM `exp_categories` WHERE cat_id = 1"}
  <h2>{category_name}</h2>
  <p>{category_description}</p>
{/exp:query}

```

You should **not** use segments on the query.
> 1 votes

---
Tags: categories, channel
---


# Question
Title: Unable to search for YouTube videos in DevDemon's Channel Videos
I have installed the latest version of Channel Videos 3.2.0A. When I am in the channel entry and try to search for a YouTube video, or manually enter the YouTube URL, I just get a spinning circle. It never completes the search. Vimeo works fine. I don't know if this is related to the latest api changes with YouTube. Are we supposed to be entering an api key? I didn't see anything about it in the documentation.

Thanks

\**Additional information: This is an MSM install, and Channel Videos is searching YouTube properly on the other 2 MSM sites. The only thing I can think of that is different about this site is that there is an SSL certificate of the site where I'm having the issue.

# Answer
I've just tried your version on a fresh install (EE 2.10.1) and it's working as expected: Fields populate and I can see previews and all in the backend (I've not built a page yet). The search and capture of data from YT doesn't seem dependant on an API key (I've not used one), so I think it's environmental.

* What EE are you on?
* Which URL are you embedding? The shared one (exposed when you click the share button below the video, right?)
> 0 votes

---
Tags: devdemon, channel-videos
---


title: Adding dynamic text to SVG

text:
# Question
Title: Adding dynamic text to SVG
I’m looking for an easy way to add a bit of dynamic text to a svg graphic. Basically, I need to change a few characters (\<50) next to a logo, and have it display in the correct font. Anyone done this with EE?

# Answer
> 1 votes
Just a wild, out there, not an answer but an idea,...

Could you not just load the SVG graphic as a background (something like http://www.html5rocks.com/en/tutorials/svg/mobile\_fundamentals/), then overlay the SVG text on top?

# Answer
> 1 votes
Your options are:

1. Best choice is to have the SVG raw in the EE template, then you can inject the dynamic text exactly where you want it. Negatives are that it increases the initial DOM filesize. See below for example.
2. Edit the SVG in editing software and add the text in there - not viable as not dynamic, unless there's a limited amount of variations.
3. As Blatant suggested, overlay another DOM object over the top. Although could be tricky with positioning in various browsers and responsive. And if using an SVG object, then you'd need it dynamic, so loaded in via the template, not external
4. Save JS variables in the EE template, then on pageload you can access the SVG object (raw JavaScript only - not JQuery) to inject the relevant DOM items into the SVG. Negatives with this approach is the SEO value could be diluted as the text is injected after pageload.
5. Way more complex and not worth the effort, but write an add-on to edit the SVG external file and injecting the dynamic text before loading. Including all options here, however far out!

EE template:

```
EE template before

<svg  version="1.1" id="whatever" class="logo" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
width="612px" height="502.174px" viewBox="0 65.326 612 502.174" enable-background="new 0 65.326 612 502.174" xml:space="preserve">

  <your logo or shapes here>
  {ee_text_here}

</svg>

EE template after

```

See SVG example code here.

---
Tags: general-knowledge
---


title: Postmaster Redirect

text:
# Question
Title: Postmaster Redirect
Has anyone had this issue and how did they resolve it?

When creating a Parcel and clicking "Save Parcel" it redirects to http://example.com/admin/?/cp/addons\_modules/show\_module\_cp&module=postmaster&method=index&S=39ety0362145b690daab1612312a8509d

This returns a blank page, my site is based from /system not /admin. I see the Parcel is created when I go back into the module but it's funky. I would ask the dev and have but it seems he may have abandoned his add-ons. Thanks for any help.

# Answer
Check the value of `$config['cp_url']`, under **Admin → System Administration → Config File Editor**. I would guess that you have `http://example.com/admin` in there.
> 1 votes

---
Tags: postmaster
---


# Question
Title: Is there a way to change EE Control Panel menu/submenu to open on click instead of hover?
I'm wondering if there is a way to disable EE control panel menu/submenu appear by hover. Instead I would like to set it up to open on click.

(i know that base menu initiate on click - first time, and then all other appear on hover), i would like to disable hover totaly.

Why this, well, i'm building nice custom EE control panel theme, with left vertical menu, but i'm having problems with submenu appearing when i don't want them to...

Thanks everyone in advance

# Answer
Short answer... No

Perhaps too short, let me expand... Not easily

Ok, jokes aside, the JS which you wish to taget is dee pin the file `/themes/javascript/compressed/jquery/plugins/ee_navigation.js`. Note it is compressed, not sure you can even get the uncompressed version anywhere. You could try wading through it (good luck to you!) or perhaps try re-writing it.

You might get some milage from the P&T CP CSS & JS plugin, you could use this to 'reset' the menu and apply your own suckerfish style navigation...
> 0 votes

# Answer
Superfish EE Control Panel

Might need tweaking to change events to click instead of hoverIntent and possibly this is only the top level menus not the sub-menu blow-outs.

Or at the very least you'll know how to inject your own JS into the CPanel interface and write your own for your needs.
> 0 votes

---
Tags: ee2, control-panel, javascript, css
---


# Question
Title: Orderby title and organize by another custom field
I have a low search filter set up which works great however the client now wants to separate the results by country of origin. This should be possible as the country is set by another custom field.

I see this working with Stash, but cannot seem to wrap my head around how to do it.

Working code with all results sorted by title:

```
{exp:low_search:form query="{segment_3}" result_page="{transcribe:language_abbreviation}/branch-locator/filter" form_id="region-filter" form_onchange='submit()'}
  <div class="form-group">
    <select class="form-control" name="child:pl_branch_region">
      {exp:channel:entries
        channel="regions"
        dynamic="no"
        orderby="title"
        sort="asc"
        disable="categories|member_data|pagination|custom_fields"
      }
      {if count=="1"}<option value="">All ({total_results})</option>{/if}
  <option value="{entry_id}"{if low_search_child:pl_branch_region == entry_id} selected{/if}>
        {title}
    </option>
      {/exp:channel:entries}
    </select>
  </div>
{/exp:low_search:form}

```

What I need to do is separate the results into country which is another field {reg\_country} with value of either "can" or "usa"

Ideally the option list would be output like this:

Canada Alberta British Columbia Manitoba etc.... USA Conneticut Maine et..

currently all results are listed alphabetically but not sorted by country.

# Answer
> 2 votes
You can do this with a Stash list nested inside itself, like so:

```
{exp:stash:set_list name="regions" parse="yes"}
    {exp:channel:entries
        channel="regions"
        dynamic="no"
        orderby="title"
        sort="asc"
        disable="categories|member_data|pagination"
    }
        {stash:entry_id}{entry_id}{/stash:entry_id}
        {stash:title}{title}{/stash:title}
        {stash:reg_country}{reg_country}{/stash:reg_country}
    {/exp:channel:entries}
{/exp:stash:set_list}

{exp:stash:get_list name="regions" unique="reg_country"}
    <optgroup label="{reg_country}">
        {exp:stash:get_list:nested name="regions" prefix="nested" match="#^{reg_country}$#" against="reg_country"}
            <option value="{nested:entry_id}"{if low_search_child:pl_branch_region == nested:entry_id} selected{/if}>
                {nested:title}
            </option>
        {/exp:stash:get_list:nested}
    </optgroup>
{/exp:stash:get_list}

```

---
Tags: stash, low-search, template-scripting
---


# Question
Title: How to order Low Search results by Low Reorder Set?
I know it's possible to sort Low Search results by a Low Reorder set (http://gotolow.com/addons/low-reorder/changelog), but for the life of me I cannot figure out how to do it.

I have a Low Reorder set named "lr\_locations". This is my results tag:

```
{exp:low_search_results default:orderby_sort="lr_locations|asc" ...}

```

Is this the correct way to do this? I cannot find the documentation that speaks to this.

# Answer
> 2 votes
Try using `orderby="low_reorder:lr_locations"`.

---
Tags: low-search, low-reorder
---