This forum has moved to a new location and is in read-only mode. Please visit talk.octobercms.com to access the new location.

triagmas
triagmas

Please help. Catch error. In documentation https://octobercms.com/docs/database/model#file-attachments the first three parameters is the width, height and mode. What am I doing wrong?

Error

We're sorry, but an unhandled error occurred. Please see the details below.
An exception has been thrown during the rendering of a template ("Invalid dimension type. Accepted types: exact, portrait, landscape, auto, crop.").

/home/triagmas/Dropbox/Code/privia/themes/privia/pages/catalog.htm line 33
<div id="ro-shop-tab" class="tab-content">
  <div id="ro-shop-spa" class="tab-pane active in">
    <div class="row">
      {% for product in ProdPrivia.getProducts %}
      <div class="col-md-3 col-sm-6 col-xs-12">
        <div class="ro-shop-tab-item">
33  <div class="ro-image"><img src="{{ product.attachments.0.thumb(270,300,crop) }}" alt="{{ product.title }}"/>
          <div class="ro-overlay">
              <div class="ro-overlay-inner ro-cell-vertical-wrapper">
                <div class="ro-cell-middle"><a href="cart.html"><i class="icon-ecommerce-cart"></i></a><a href="#"><i class="icon-basic-heart"></i></a></div>
              </div>
            </div>
          </div>
noideawhattotypehere
noideawhattotypehere

Hey, I was having the same problem. You should use this: product.attachments.0.getThumb(250, 300, 'crop')

1-2 of 2

You cannot edit posts or make replies: the forum has moved to talk.octobercms.com.