0

I have a strange problem where a CE Image tag is outputting fine for one Stash list but not another but only when within a Low Search results tag, works fine in a normal channel entries tag.

APPEND LIST

{product_styles search:code="not IS_EMPTY"}
  {exp:stash:append_list
    name="product_images_{entry_id}"
  }
    {stash:product_lg}
    <img src="{exp:ce_img:single
      src='{image}'
      width='350'
      height='350'
      crop='yes'
      quality='85'
      url_only='yes'
      allow_scale_larger='yes'
      interlace='yes'}">
    {/stash:product_lg}
    {stash:product_options}
      <option
        value="{title} {code}"
        data-thumb="{exp:ce_img:single
          src='{image}'
          width='50'
          height='50'
          crop='yes'
          quality='85'
          url_only='yes'
          interlace='yes'}"
      >{code} {title}</option>
    {/stash:product_options}
  {/exp:stash:append_list}
{/product_styles}

OUTPUT

{exp:stash:get_list name="product_images_{entry_id}"}
{product_lg}
{/exp:stash:get_list}

{exp:cartthrob:add_to_cart_form}
  <select>
    {exp:stash:get_list name="product_images_{entry_id}"}
    {product_options}
    {/exp:stash:get_list}
  </select>
{/exp:cartthrob:add_to_cart_form}

So with the above, I get a series of images output fine where {product_lg} is, but where {product_options} is, it's outputting <option value="XXXXX" data-thumb="{exp:ce_img:single src='filename.jpg'… ">XXXXX</option>, i.e. parsing the CE image tag inside the option.

Which I can't work out because it's essentially the same tag just with slightly different parameters. Anyone have any ideas what's going wrong? :?

1
  • Have you tried parameters for the append_list like parse_vars="yes" and parse_depth="2"? May 13 '16 at 13:12
1

You're using the single tag form of {exp:ce_img}, and if you repeat an instance of a single tag in the same template EE will "cache" subsequent instances after parsing the first (replaces with a random-string marker, with the intention of replacing with the value at the end of parsing). You can either append the word random at the end of the ce_img tag parameters, or cause the image to be fully parsed when the list is appended by using parse="yes".

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.